ios8

Selecting the iOS Simulator device type with RubyMotion

拥有回忆 提交于 2019-12-10 04:10:00
问题 Since iOS 8 was released the default device type for simulator became iPhone 6. And even if I manually change the device type using Hardware > Device menu, on the next launch (using rake simulator ) the simulator will revert to iPhone 6. I wonder if there is any rake options, or some other settings to force the device type. PS. I know that there are ways to force a non-retina iPhone and a way to launch the iPad simulator instead of the iPhone one, but I'm interested in selecting between 5/6/6

Error compiling storyboard files using Xcode 6 beta 5

て烟熏妆下的殇ゞ 提交于 2019-12-10 03:32:04
问题 My app was building fine in Xcode 6 Beta 4. I updated to Beta 5 today and ran into 2 errors: The file “Storyboard_iPad-SBPartialInfo.plist” couldn’t be opened because there is no such file. Command /Applications/Xcode6-Beta5.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ibtool failed with exit code 255 What is that SBPartialInfo.plist? I could not search for it via spotlight. My Storyboard files are storyboard_iphone and storyboard_ipad 回答1: I was also

Xcode 6/iOS 8 Location Simulation doesn't work

筅森魡賤 提交于 2019-12-10 03:32:00
问题 I've just updated to Xcode 6/iOS 8 SDK and my location service simulation in simulator started not working. It was fine before I updated (I'm currently unable to test on real device). Now, when I select a location for simulation, nothing happens. Delegate's -(void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations method is not called. I've restarted Xcode, cleaned the build folder, nothing changed. Why can this happen? 回答1: Since IOS 8 you need to ask for

UIActivityViewController on iOS 8 show “more” button with custom activities

让人想犯罪 __ 提交于 2019-12-10 03:26:36
问题 Now XCode 6 with iOS 8 SDK is out, we can talk about stuff. I tried to use custom activities with UIActivityViewController on iOS 7, everything worked fine. But on iOS 8, when custom activities are shown, there is "more" button sitting next to them and clicking on this button show exactly the same custom activities. Did anyone find a workaround to remove this button? I couldn't find any solution yet. 回答1: There is nothing to workaround. The "More..." button lets the user reorder the icons.

Proper way to handle a fail to init

青春壹個敷衍的年華 提交于 2019-12-10 03:05:49
问题 I am looking for a proper way to handle a invalid argument during a initialization. I am unsure how to do it using Swift as the init has't a return type. How can I tell whoever is trying to initialize this class that you are doing something wrong? init (timeInterval: Int) { if timeInterval > 0 self.timeInterval = timeInterval else //???? (return false?) } Thank you! 回答1: Use a failable initializer . Such an initializer looks very similar to a regular designated initializer, but has a '?'

constant 'result' inferred to have type (), which may be unexpected

空扰寡人 提交于 2019-12-10 02:41:52
问题 @IBAction func operate(sender: UIButton) { if let operation = sender.currentTitle { if let result = brain.performOperation(operation) { displayValue = result } else { displayValue = 0.0 } } } I am new to coding so pardon my coding format and other inconsistencies. I have been trying out the iOS 8 intro to swift programming taught by Stanford university and I have ran into a problem with the modified calculator. I get three errors. The first one is a swift compiler warning - at if let result =

TouchID crash on some iPhone 5S devices

我的梦境 提交于 2019-12-10 02:30:10
问题 My app crashes on some iPhone 5S device (only some) with the error: Fatal Exception: NSInternalInconsistencyException Unexpected error: Error Domain=NSCocoaErrorDomain Code=4097 "The operation couldn’t be completed. (Cocoa error 4097.)" (connection to service named com.apple.CoreAuthentication.daemon) UserInfo=0x174461dc0 {NSDebugDescription=connection to service named com.apple.CoreAuthentication.daemon} The line which breaks the app is the following: LAContext().canEvaluatePolicy(LAPolicy

iOS 8 Today widget alignment issue

耗尽温柔 提交于 2019-12-10 02:24:53
问题 Here is my storyboard I'm using autolayout, and NOT using size classes. When I ran it on iPhone 5s, it works fine.(both portrait and landscape) But when I ran it on iPhone 6 plus (portrait), it's not aligning properly. on iPhone 6 plus (landscape), it's worse. I know I can use -widgetMarginInsetsForProposedMarginInsets: to set the margin, but in that case I will need to customize the margin for every device. That would be horrible :( So is there a way to align the subview to the title less

Prevent UISearchController from hiding the navigation bar

╄→гoц情女王★ 提交于 2019-12-10 02:02:08
问题 When a UISearchController's search bar becomes active, it hides the view's navigation bar. I'd like to have the search bar active below the navigation bar. In iOS 7 there was a good way to do this for UISearchDisplayController here: https://stackoverflow.com/a/12529945/3799720 But now in iOS 8 with UISearchController I can't figure out how to do this. 回答1: This might have something to do with the UISearchController hidesNavigationBarDuringPresentation property. 回答2: yourSearchController

Communicate with Custom Keyboard extension with Host App not working in device but works in simulator

淺唱寂寞╮ 提交于 2019-12-09 20:08:34
问题 I am working with custom keyboard extension. that almost done but i just facing issue with device when i communicate data with extension and my host app that not woking in device but same thing this working in simulator. My code is following: HostApp View controller: - (void)viewDidLoad { _defaultvalue = [[NSUserDefaults alloc] initWithSuiteName:@"group.myapp.myappname.targetKeyboard"]; [_defaultvalue setBool:YES forKey:@"Layout"]; [_defaultvalue synchronize]; [super viewDidLoad]; // Do any