ios8

external framework File/File.h (Parse/Parse.h) file not found

风格不统一 提交于 2019-12-17 18:25:08
问题 So every time I update my app, Xcode claims not to be able to find a particular external framework even though it's there. It's happened again with Xcode 6 and my usual methods (I'm fairly inexperienced, so these basically involve clicking and typing things until something happens (I exaggerate but not by much)) aren't working. I'm getting a Lexical or Preprocessor Issue error that says 'Parse/Parse.h' file not found.' But here are screenshots of it in the project and added to the library: I

UIAlertController handle dismiss upon click outside (IPad)

眉间皱痕 提交于 2019-12-17 18:17:59
问题 Previous to iOS8 we used the UIActionSheet for showing alert and now we need to use the UIAlertController. When we used the UIActionSheet we could easily handle situations where the user clicked outside the pop up (which means he want to cancel the operation) by comparing the clickedButtonAtIndex to the cancelButtonIndex - if the user indeed pressed outside the popup we got the cancel button index in this function. How can we handle these situations with the new UIAlertController? I tried to

Passing Data in Swift

僤鯓⒐⒋嵵緔 提交于 2019-12-17 17:34:44
问题 I have been looking for an answer for this, but have only found answers for segues. I have viewController1 with a button that segues to viewController2 . There is no code for this, I set it up through Interface builder. On viewController2 I have a button that dismisses itself with self.dismissViewControllerAnimated(true, completion, nil) I want to pass a string from viewController2 back to viewController1 when the view is dismissed. How do I go about doing this? Also, I am using swift. Thanks

NSUserDefaults Unreliable in iOS 8

牧云@^-^@ 提交于 2019-12-17 17:33:28
问题 I have an app that uses [NSUserDefaults standardUserDefaults] to store session information. Generally, this information is checked on app launch, and updated on app exit. I have found that it seems to be working unreliably in iOS 8. I am currently testing on an iPad 2, although I can test on other devices if need be. Some of the time, data written before exit will not persist on app launch. Equally, keys removed before exit sometimes appear to exist after launch. I've written the following

Cookie sharing between multiple WKWebViews

馋奶兔 提交于 2019-12-17 17:26:43
问题 I create a few WkWebViews in my app, but when cookies are set for one webview, they do not take effect in the other ones (i.e. the other webviews do not pass the same cookie back to the server). How can I get them to all use the same cookie storage? 回答1: Got this working by using the same WKProcessPool for all the webviews. First create a process pool once somewhere: processPool = [[WKProcessPool alloc] init]; Then use it when creating WKWebviews. The pool must be set in the init method, not

Hide Status Bar In iOS 8 app

左心房为你撑大大i 提交于 2019-12-17 17:26:37
问题 I have tried [[UIApplication sharedApplication] setStatusBarHidden:YES]; This does nothing. And I have looked in my Info.plist file for "View controller-based status bar appearance" but it's not there. How can I hide the white status bar at the top of the screen (with the clock and battery charge) inside my app for Xcode 6? Thank you! 回答1: You need to override this method on each view controller unless you have that plist entry. Objective-C -(BOOL)prefersStatusBarHidden{ return YES; } Swift 2

MapKit in Swift, Part 2

人走茶凉 提交于 2019-12-17 17:00:17
问题 I'm trying work with Map Kit in Swift. I try to display the area on the map, one pin (MKPinAnnotationView) and the current position. All display fine. I try to add Disclosure Button and intercept tapping on it. Disclosure Button added, but does not work intercept tapping. Function pinPressed with method calloutAccessoryControlTapped not work.... This is a sample code: import UIKit import MapKit import CoreLocation class ViewController: UIViewController, MKMapViewDelegate,

Can you programmatically toggle Do Not Disturb mode in iOS 8 (w/ Swift)?

ε祈祈猫儿з 提交于 2019-12-17 16:48:07
问题 Doing some research on this, it looks like you couldn't toggle Do Not Disturb mode in iOS 6 or 7. Wondering if you can do it in iOS 8. I can't find anything in Apple's docs Any help would be great. Thanks! 回答1: This functionality would be outside of the sandbox that Apple puts each application in. Contact between apps and contact outside of the sandbox is very restricted. One example that Apple lets you get away with is turning on the flashlight, but like AirPlane mode, Do Not Disturb (should

Remove Next / Previous buttons (inputAccessoryView) for Custom Keyboard in iOS8 WebView

孤者浪人 提交于 2019-12-17 16:37:08
问题 Please bear with me, I searched a lot over the internet and I couldn't find a solution since it's a new API. I am trying to create a custom keyboard for iOS 8. It works perfectly fine except in WebView! It has previous-next button, which are in inputAccessoryView . I know it's read-only property for webview but since iOS 8 allows the users to have custom keyboard I assume this view should be editable somewhere. Has anybody run into the same issue? Any help would be appreciated. 回答1: You may

UITableView invoke swipe actions programmatically

本秂侑毒 提交于 2019-12-17 16:06:50
问题 I have a UITableView where the user can swipe left to reveal actions (like in iOS 8 mail). That all works as expected. I want to trigger this when the user taps on a certain part of the cell. How can I invoke this slide action programmatically? Current behavior: User must swipe the cell left to disclose the action buttons. Desired behavior: User taps (an actions button) on the cell. Cell slides over to disclose the action buttons. 回答1: Well I couldn't find a way to do this programmatically,