ios8

IOS swift creating app folder error

别等时光非礼了梦想. 提交于 2019-12-19 11:51:32
问题 I got problem with creating folder for PhotoLibrary . Does anyone know what is wrong there? var albumPlaceholder:PHObjectPlaceholder! //create the folder NSLog("\nFolder \"%@\" does not exist\nCreating now...", albumName) PHPhotoLibrary.sharedPhotoLibrary().performChanges({ let request = PHAssetCollectionChangeRequest.creationRequestForAssetCollectionWithTitle(albumName) albumPlaceholder = request.placeholderForCreatedAssetCollection }, completionHandler: {(success:Bool, error:NSError!)in

How to change font size for iPhone 4 and IPhone 5 in auto-layout?

杀马特。学长 韩版系。学妹 提交于 2019-12-19 11:24:38
问题 I am trying to change font size of uilabel for iphone 4 and iphone 5 using autolayout and size classes. IB is giving option only for ipad and greater phones like iphone 6 and 6P . If i change font for wR and hR then it changes fonts size for iphone 4 , 5 and 6 which is wrong in my case . Please help me in this regard. 回答1: Unfortunately , Apple Provides minimum consideration for all iPhone's(4,5,6,6p version) Portrait Mode Compact Width - Compact Height or Compact Width - Regular Height . So

UIScrollView scrolling only with one finger

牧云@^-^@ 提交于 2019-12-19 11:14:35
问题 iOS7 & iOS8 I need to disable 2 or three fingers scrolling in UIScrollview . I tried : [self.scrollView.panGestureRecognizer setMaximumNumberOfTouches:1]; [self.scrollView.panGestureRecognizer setMinimumNumberOfTouches:1]; But it has no effect. It is still possible to scroll with 2 fingers. If i tried to set max and min to 2. One finger scrolling was disabled but 3 fingers scrolling possible :( I tried this too, but without success: for (UIGestureRecognizer* pan in self.scrollView

UIScrollView scrolling only with one finger

99封情书 提交于 2019-12-19 11:13:50
问题 iOS7 & iOS8 I need to disable 2 or three fingers scrolling in UIScrollview . I tried : [self.scrollView.panGestureRecognizer setMaximumNumberOfTouches:1]; [self.scrollView.panGestureRecognizer setMinimumNumberOfTouches:1]; But it has no effect. It is still possible to scroll with 2 fingers. If i tried to set max and min to 2. One finger scrolling was disabled but 3 fingers scrolling possible :( I tried this too, but without success: for (UIGestureRecognizer* pan in self.scrollView

NSDateFormatter issue with date format in iOS 8

半世苍凉 提交于 2019-12-19 09:42:16
问题 I have an NSDateFormatter which I use to format an NSDate into a string. The following format does not work: ddMMyyyy_hhmmss_SSS. When I try to format an NSDate I get the following output: 18092014_08:49:03,638, which has a colon and a comma I didn't specify in the format. Note that in iOS 7 I never had this kind of problem. This is the code I'm using: NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init]; [dateFormat setDateFormat: @"ddMMyyyy_hhmmss_SSS"]; NSString *dateString =

WKWebView embed video keeps playing sound after release

心已入冬 提交于 2019-12-19 09:28:01
问题 I'm implementing a service for playing video files with a webview. I migrated from UIWebView to WKWebView, and trying to play Youtube and Coub videos with it. Almost everything is okay, no crashes in iOS 8, but after WKWebView released and removed from screen, video sound keeps playing for a while (in some cases about 45 seconds). I can't find the way to stop sound of video. I tried to catch system notifications with a media player, but no success. Is there any way to stop sound or video in

Detect iOS8 Reachability Gesture

半城伤御伤魂 提交于 2019-12-19 09:07:59
问题 Any ways to detect the new Reachability gesture of iOS8 in Objective-C? The gesture is activated double tapping the TouchID button on the iPhone6 and iPhone6Plus. 回答1: There are no public APIs for it. There are two related private API methods on UIApplication I can find (using either of these should get your app rejected from the App Store): _setReachabilitySupported: , which presumably would en/disable reachability (like Spotlight) _deactivateReachability , which would return the view to the

ios8 UIModalTransitionStylePartialCurl doesn't work properly

两盒软妹~` 提交于 2019-12-19 08:56:34
问题 Under ios 8 using presentViewController modalTransitionStyle = UIModalTransitionStylePartialCurl disappear all page. I want it to work like ios 7. 回答1: I had the same issue and I applied this fix, it worked for me on iOS 8 and Xcode 6. [_mapToolbarController setModalTransitionStyle:UIModalTransitionStylePartialCurl]; [self presentViewController:_mapToolbarController animated:YES completion:^{ [_mapToolbarController.view.superview addSubview:self.view]; }]; Obviously, _mapToolbarController

How to detect if ios8 custom keyboard extension is running in not iphone 6 optimized app?

柔情痞子 提交于 2019-12-19 08:55:23
问题 In the app that not optimized for iphone 6 in standard display mode keyboard and status bar shows zoomed. This causes my manually layouted custom keyboard extension to show streched. How can I detect this zooming to fix layout? 回答1: Use self.view.frame.size.width It returns 320 for zoomed mode & 414 for regular mode on my 6+ (hopefully on 6 also) in - (void)updateViewConstraints 回答2: Eventually you will not need to do this as whatsapp and other apps get updated (I believe whatsapp just did)

How to get Original Image and media type from PHAsset?

时光总嘲笑我的痴心妄想 提交于 2019-12-19 08:29:47
问题 My **GMImagePickerController** returns the list of selected images from photos app. The code are as follows. - (void)assetsPickerController:(GMImagePickerController *)picker didFinishPickingAssets:(NSArray *)assetArray { NSLog(@"%@",assetArray); NSLog(@"GMImagePicker: User ended picking assets. Number of selected items is: %lu", (unsigned long)assetArray.count); } The assetArray return result like this, I selected 3 images from photos app ( "<PHAsset: 0x7fa39e02e840> 1AEEF04A-F8AB-4019-AAB5-