ios8

Save images with phimagemanager to custom album?

非 Y 不嫁゛ 提交于 2019-12-17 05:40:43
问题 I am making an app that takes pictures with AVFoundation and I want to save them to a custom album that I can then query and show in my app. (I'd prefer to not have them in the general photo roll, unless the user wants that) I can't really find anything showing how to do this in Swift... or at all. Is there a different way I am supposed to do this? I found this example on SO but it doesn't make sense to me and I can't get it to work. func savePhoto() { var albumFound : Bool = false var

Document Directory Path of iOS 8 Beta Simulator

爱⌒轻易说出口 提交于 2019-12-17 05:36:28
问题 In iOS 7, the document directory of the iOS simulators can be found in: /Users/Sabo/Library/Application Support/iPhone Simulator/ However, in iOS 8 Beta Simulator , I can't find the corresponding directory for iOS 8 in the directory above. Where's the document directory path for the iOS 8 Simulator? 回答1: on my computer, the path is: ~/Library/Developer/CoreSimulator/Devices/1A8DF360-B0A6-4815-95F3-68A6AB0BCC78/data/Container/Data/Application/ NOTE: probably those long IDs (i.e UDIDs) are

Determine if the access to photo library is set or not - PHPhotoLibrary

北城以北 提交于 2019-12-17 04:43:09
问题 With the new functionality in iOS 8, if you are using a camera in the app, it will ask for permission to access the camera and then when you try to retake the pic, it asks for permission to access photo library. Next time when I launch the app, I wish to check if the camera and photo library has access permissions to it. For camera, I check it by if ([AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeVideo] == AVAuthorizationStatusDenied) { // do something } I am looking for

How to determine the content size of a WKWebView?

有些话、适合烂在心里 提交于 2019-12-17 04:13:18
问题 I am experimenting with replacing a dynamically allocated instance of UIWebView with a WKWebView instance when running under iOS 8 and newer, and I cannot find a way to determine the content size of a WKWebView. My web view is embedded within a larger UIScrollView container, and therefore I need to determine the ideal size for the web view. This will allow me to modify its frame to show all of its HTML content without the need to scroll within the web view, and I will be able to set the

Adaptive segue in storyboard Xcode 6. Is push deprecated?

回眸只為那壹抹淺笑 提交于 2019-12-17 04:10:46
问题 Xcode 6 interface builder by default has new checkbox "use size classes". It makes views adaptive. When I try to make segue between 2 views in my storyboard I have new options: instead old: Now we have "show" and "present modally" instead of "push" and "modal". The old options are marked as deprecated. I've chosen "show" option, because in segue settings it called "show (e.g. push) But it doesn't make push. Segue animation looks like slide from the bottom (modal) and navigation bar disappears

iOS 8 Snapshotting a view that has not been rendered results in an empty snapshot

我只是一个虾纸丫 提交于 2019-12-17 03:21:34
问题 In iOS 8 I am having problem capturing images from camera till now I am using this code for UIImagePickerController *controller=[[UIImagePickerController alloc] init]; controller.videoQuality=UIImagePickerControllerQualityTypeMedium; controller.delegate=(id)self; controller.sourceType=UIImagePickerControllerSourceTypeCamera; [self presentViewController:controller animated:YES completion:nil]; But in iOS 8 I am getting this: Snapshotting a view that has not been rendered results in an empty

Reading in a JSON File Using Swift

无人久伴 提交于 2019-12-17 02:52:27
问题 I'm really struggling with trying to read a JSON file into Swift so I can play around with it. I've spent the best part of 2 days re-searching and trying different methods but no luck as of yet so I have signed up to StackOverFlow to see if anyone can point me in the right direction..... My JSON file is called test.json and contains the following: { "person":[ { "name": "Bob", "age": "16", "employed": "No" }, { "name": "Vinny", "age": "56", "employed": "Yes" } ] } The file is stored in the

UIPopoverPresentationController on iOS 8 iPhone

三世轮回 提交于 2019-12-17 02:12:17
问题 Does anyone know if UIPopoverPresentationController can be used to present popovers on iPhones? Wondering if Apple added this feature on iOS 8 in their attempt to create a more unified presentation controllers for iPad and iPhone. Not sure if its OK to ask/answer questions from Beta. I will remove it in that case. 回答1: You can override the default adaptive behaviour ( UIModalPresentationFullScreen in compact horizontal environment, i.e. iPhone) using the

UIPopoverPresentationController on iOS 8 iPhone

拜拜、爱过 提交于 2019-12-17 02:11:06
问题 Does anyone know if UIPopoverPresentationController can be used to present popovers on iPhones? Wondering if Apple added this feature on iOS 8 in their attempt to create a more unified presentation controllers for iPad and iPhone. Not sure if its OK to ask/answer questions from Beta. I will remove it in that case. 回答1: You can override the default adaptive behaviour ( UIModalPresentationFullScreen in compact horizontal environment, i.e. iPhone) using the

What is an “unwrapped value” in Swift?

我与影子孤独终老i 提交于 2019-12-17 02:06:25
问题 I'm learning Swift for iOS 8 / OSX 10.10 by following this tutorial, and the term " unwrapped value " is used several times, as in this paragraph (under Objects and Class ): When working with optional values, you can write ? before operations like methods, properties, and subscripting. If the value before the ? is nil, everything after the ? is ignored and the value of the whole expression is nil. Otherwise, the optional value is unwrapped , and everything after the ? acts on the unwrapped