ios8

UIView.animateWithDuration not animating

邮差的信 提交于 2019-12-24 01:01:35
问题 The UIView.animateWithDuration call in my ViewController viewDidLoad function does not animate. The completion block gets called immediately. The println output shows 'completion true'. Is the viewDidLoad function the wrong place to put my startup animation? Any hints are greatly appreciated. class ViewController: UIViewController { @IBOutlet var beatIndicator:UIView? override func viewDidLoad() { super.viewDidLoad() if let led = beatIndicator? { led.alpha = 1.0 led.frame = CGRectMake(20, 20,

How do I get mailto links in iOS (safari) to open the Outlook app?

限于喜欢 提交于 2019-12-24 00:56:39
问题 I've noticed that on iPhone users who are using the Outlook app and do not have the native mail app configured, that when they click on mailto links it prompts them to create a new email account in iOS, instead of opening the Outlook app. Is there anyway to have Outlook set as the default for mailto links on the iPhone? 回答1: Instead of 'mailto:' protocol you can use below protocol to open outlook app ms-outlook://compose?to=joe@example.com&subject=Hello 回答2: iOS doesn't currently support

How do I get mailto links in iOS (safari) to open the Outlook app?

99封情书 提交于 2019-12-24 00:54:15
问题 I've noticed that on iPhone users who are using the Outlook app and do not have the native mail app configured, that when they click on mailto links it prompts them to create a new email account in iOS, instead of opening the Outlook app. Is there anyway to have Outlook set as the default for mailto links on the iPhone? 回答1: Instead of 'mailto:' protocol you can use below protocol to open outlook app ms-outlook://compose?to=joe@example.com&subject=Hello 回答2: iOS doesn't currently support

iOS 8 Game Center Error

半城伤御伤魂 提交于 2019-12-24 00:46:43
问题 I updated my XCode and iOS. My codes worked well before update. Now I can't login game center. Console gives this error GameKitHelper ERROR: { NSLocalizedDescription = "The requested operation could not be completed because this application is not recognized by Game Center."; } 回答1: I found the answer. Sandbox is not enable in iOS 8. Need to enable Sandbox in Settings -> Game Center -> Sandbox. 来源: https://stackoverflow.com/questions/25945420/ios-8-game-center-error

How to Pass information Back in iOS when reversing a Gesture Recognizer using Swift?

梦想与她 提交于 2019-12-24 00:45:06
问题 I'm new to iOS Development, and Swift. And many of the resources I've found on the Google are written in Objective-C, which I am not familiar also. I have two view Storyboards, S1 and S2. Each of them have at least 1 View Controller, VC1 and VC2 respectively. I go from S1 to S2 using a Gesture Recognizer, not a Segue. On S2, I select a data taken from a Table View. When I press a value from the list on the table, I would like to send that values back to S1. What's the best way to do this

Address book change callback registered with ABAddressBookRegisterExternalChangeCallback is never called (iOS 8)

主宰稳场 提交于 2019-12-24 00:29:05
问题 I've found plenty of examples around this but after reading the entire ABAddressBook documentation I'm still not able to figure out why, in my case, my change callback is not being called. I simply set up an address book and register a callback function for it. I can access the address book just fine, but the callback function is never called no matter how much I change contacts in the Contacts app and then reopen my app. Is there any reason that the callback would never be called? I've

How can I rotate a UIViewController to its supported interface orientation when navigating to it?

瘦欲@ 提交于 2019-12-23 23:13:16
问题 I have a viewcontroller (with child viewcontrollers) that is locked in portrait, using the following code to accomplish this: - (UIInterfaceOrientationMask) supportedInterfaceOrientations { if ([self.centerViewController respondsToSelector:@selector(supportedInterfaceOrientations)]) { return [self.centerViewController supportedInterfaceOrientations]; } return UIInterfaceOrientationMaskAll; } This works perfectly, I can "override" the supportedInterfaceOrientations in my current

CMAltimeter callback never fires

♀尐吖头ヾ 提交于 2019-12-23 22:47:49
问题 Using my 6+ I've been trying to read the relative altitude and pressure using CoreMotion's new CMAltimeter. However the callback is never firing. I have a very similar setup which instead uses the accelerometers, gyros, and magnetometers. They all seem to work fine. Was wondering if anyone out there has managed to get a reading? - (void)viewDidLoad { [super viewDidLoad]; if([CMAltimeter isRelativeAltitudeAvailable]){ CMAltimeter *altimeterManager = [[CMAltimeter alloc]init]; [altimeterManager

Xcode 6 Launch Image for iPhone 6 plus

雨燕双飞 提交于 2019-12-23 22:23:12
问题 Where should I need to put my @3x image in Launch screen section. There is no placeholder for @3x in Launch Image Section. Even if I put @3x image in my resource. Its not automatically picking it up. Can anybody tell how can we use @3x image in Xcode 6 for slash. 回答1: Look I prepeared image for you, because it is easier to understand, than words 回答2: In your xcassets file you need to check the attribute inspector of the LaunchScreen section. You should be able to check a checkbox saying "iOS8

UIWebview does not display embedded youtube well for iOS 8

最后都变了- 提交于 2019-12-23 20:57:16
问题 I have difficulty to play embed youtube in UIWebview. If I used the default embed format from youtube, it does not show anything in the UIWebview. Just blank. NSString *htmlString = @"<html><body><iframe width=\"420\" height=\"315\" src=\"//www.youtube.com/embed/XNnaxGFO18o?rel=0\" frameborder=\"0\" allowfullscreen></iframe></body></html>"; [self.webView loadHTMLString:htmlString baseURL:nil]; I googled around and found the following code works. NSString* embedHTML = @"\ <html><body style=\