ios8.3

NSDateFormatter dateFromString:stringDate returning nil in iOS 8.3

核能气质少年 提交于 2019-12-02 05:57:33
问题 I have this code NSString *stringDate = @"2015-07-09 7:00 AM"; NSString *stringDateFormat = @"yyyy-MM-dd h:mm a"; NSTimeZone *timeZone = [NSTimeZone localTimeZone]; NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; dateFormatter setTimeZone:timeZone]; [dateFormatter setDateFormat:stringDateFormat]; NSDate *dateFormatted = [dateFormatter dateFromString:stringDate]; The problem now is dateFormatted keeps getting nil value. It is OK when I try it in Simulator iPhone5s 8.2 but, the

NSDateFormatter dateFromString:stringDate returning nil in iOS 8.3

只愿长相守 提交于 2019-12-02 01:20:25
I have this code NSString *stringDate = @"2015-07-09 7:00 AM"; NSString *stringDateFormat = @"yyyy-MM-dd h:mm a"; NSTimeZone *timeZone = [NSTimeZone localTimeZone]; NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; dateFormatter setTimeZone:timeZone]; [dateFormatter setDateFormat:stringDateFormat]; NSDate *dateFormatted = [dateFormatter dateFromString:stringDate]; The problem now is dateFormatted keeps getting nil value. It is OK when I try it in Simulator iPhone5s 8.2 but, the problem occurs when I run it with device iPhone5s 8.3. Can someone help me find why is dateFormatted

How can I detect if device is an iPad in iOS 8.3?

亡梦爱人 提交于 2019-12-01 17:16:40
We updated our SDK to iOS 8.3, and all of a sudden, our iPad detection method doesn't work properly: + (BOOL) isiPad { #ifdef UI_USER_INTERFACE_IDIOM return UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad; #endif return NO; } the ifdef block is never entered, and so return NO; is always run. How do I detect if the device is an iPad without using UI_USER_INTERFACE_IDIOM() ? I'm using: Xcode 6.3 (6D570) iOS 8.2 (12D508) - Compiling with iOS 8.3 compiler Deployment: Targeted Device Family: iPhone/iPad Mac OS X: Yosemite (10.10.3) Mac: MacBook Pro (MacBookPro11,3) In 8.2 UserInterfaceIdiom()

Core Location delegate methods not getting called in iOS 8.3 Xcode 6.3.1

纵然是瞬间 提交于 2019-11-30 17:25:58
I am trying to get the user's current location using the Core Location Framework in Xcode 6.3.1, I did following things: Added Core Location Framework under Target -> General -> Linked Frameworks & Libraries My ViewController.h file is as shown below, #import <UIKit/UIKit.h> #import <CoreLocation/CoreLocation.h> @interface ViewController : UIViewController<CLLocationManagerDelegate> @property (weak, nonatomic) IBOutlet UILabel *lblLatitude; @property (weak, nonatomic) IBOutlet UILabel *lblLongitude; @property (weak, nonatomic) IBOutlet UILabel *lblAddress; @property (strong, nonatomic)

Embedded YouTube videos in HTML5 standalone app iOS 8.3 opening YouTube app

放肆的年华 提交于 2019-11-30 13:48:05
Apple recently fixed the error on iOS 8 where YouTube videos would not play on a WebApp ( Why HTML5 video doesn't play in IOS 8 WebApp(webview)? ). This error was fixed in iOS 8.3 but I've come across another problem. When a YouTube video is embedded on the page, the video will be opened in the YouTube app if it is installed on the iPad <!DOCTYPE html> <head> <meta charset="utf-8"> <meta name="apple-mobile-web-app-capable" content="yes" /> <title>HTML5 Video Standalone Test</title> <style> body { margin:0; } </style> </head> <body> <iframe width="700" height="394" src="//www.youtube.com/embed

How to open settings app programmatically?

▼魔方 西西 提交于 2019-11-30 11:22:43
I'm using swift with ios 8.3. I want to open settings app from my application. I know that using the code UIApplication.sharedApplication().openURL(NSURL(string: UIApplicationOpenSettingsURLString)!) will open my app settings. But I don't want to open my app settings. I just want to open the settings app and stay in the main page. If possible, navigate to "Cellular". Is there any way to acheive this? Try this. if let appSettings = URL(string: UIApplicationOpenSettingsURLString) { UIApplication.shared.open(appSettings, options: [:], completionHandler: nil) } Xcode 8.2.1 - iOS 10 Update on 11

iOS 8.3 UIAlertController crashes when trying to add a textfield

穿精又带淫゛_ 提交于 2019-11-30 06:40:50
I have an iPad app. I am creating an UIAlertController and adding a textfield. It crashes. It only crashes when I add a textfield. let alert = UIAlertController(title: "Enter Name", message:nil, preferredStyle: UIAlertControllerStyle.Alert); alert.addTextFieldWithConfigurationHandler { (textfield:UITextField!) -> Void in textfield.placeholder = "Sexy time"; } alert.addAction(UIAlertAction(title: "Ok", style: UIAlertActionStyle.Default, handler: {(action:UIAlertAction!) -> Void in //Some action here })); self.presentViewController(alert, animated: true, completion: nil); I get a fun crash

Core Location delegate methods not getting called in iOS 8.3 Xcode 6.3.1

ぃ、小莉子 提交于 2019-11-30 01:48:04
问题 I am trying to get the user's current location using the Core Location Framework in Xcode 6.3.1, I did following things: Added Core Location Framework under Target -> General -> Linked Frameworks & Libraries My ViewController.h file is as shown below, #import <UIKit/UIKit.h> #import <CoreLocation/CoreLocation.h> @interface ViewController : UIViewController<CLLocationManagerDelegate> @property (weak, nonatomic) IBOutlet UILabel *lblLatitude; @property (weak, nonatomic) IBOutlet UILabel

Embedded YouTube videos in HTML5 standalone app iOS 8.3 opening YouTube app

£可爱£侵袭症+ 提交于 2019-11-29 19:15:27
问题 Apple recently fixed the error on iOS 8 where YouTube videos would not play on a WebApp (Why HTML5 video doesn't play in IOS 8 WebApp(webview)?). This error was fixed in iOS 8.3 but I've come across another problem. When a YouTube video is embedded on the page, the video will be opened in the YouTube app if it is installed on the iPad <!DOCTYPE html> <head> <meta charset="utf-8"> <meta name="apple-mobile-web-app-capable" content="yes" /> <title>HTML5 Video Standalone Test</title> <style> body

How to open settings app programmatically?

走远了吗. 提交于 2019-11-29 17:01:41
问题 I'm using swift with ios 8.3. I want to open settings app from my application. I know that using the code UIApplication.sharedApplication().openURL(NSURL(string: UIApplicationOpenSettingsURLString)!) will open my app settings. But I don't want to open my app settings. I just want to open the settings app and stay in the main page. If possible, navigate to "Cellular". Is there any way to acheive this? 回答1: Try this. if let appSettings = URL(string: UIApplicationOpenSettingsURLString) {