ios9

No back button on segue in Swift 2

微笑、不失礼 提交于 2019-12-07 00:35:55
问题 I just ported my project over to Swift 2, and everything is working great - except that even the most simple segues have no back button. Here is the prepare for segue function that I am using: override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { // Get the new view controller using [segue destinationViewController]. // Pass the selected object to the new view controller. if segue.identifier == "showExercise" { if let nav = segue.destinationViewController as?

How to center a label horizontally for all iOS devices in Swift

空扰寡人 提交于 2019-12-07 00:09:07
问题 I can't figure out how to make the label horizontally center in a image view, The label says "You've been here. What would you rate us , I want the What would you rate us to be under the "You've been here." What I attempted to do accomplish this was to add 2 lines to the labels and select the label plus the 3 buttons and clicked on "Add Missing Constrains". When I run the program this is the result. How can I fix it so the text is entered on all devices? Constrains 回答1: for your label try to

layer is a part of cycle in its layer tree iOS 9 Swift 2

折月煮酒 提交于 2019-12-06 19:51:46
问题 When I load my view controller I'm getting this error: *** Terminating app due to uncaught exception 'CALayerInvalid', reason: 'layer <CALayer: 0x7fda42c66e30> is a part of cycle in its layer tree' I don't know why. I think I might've added a third party framework that messed with layers, but I removed it in my troubleshooting. Any insights would be great. EDIT It happens during viewDidLoad of my tableViewcontroller . I have a tableView on my second vc. I've narrowed it down to it crashing on

Incomplete universal character name in UI Testing

白昼怎懂夜的黑 提交于 2019-12-06 18:40:52
问题 I am using Xcode 7's new feature : UI Testing. After recording the interaction, Xcode generated the code automatically : - (void)testDoubleTapToolBarItem { [[[XCUIApplication alloc] init].tabBars.buttons[@"\U5173\U6ce8"] doubleTap]; ~~~~~~~~~~~~~~~~ } However, warning showed as well. Any one know how to fix this? Incomplete universal character name Edit: This seems to be a BUG since Xcode 7.0 GM 回答1: You can use the following workaround as this seems to be a bug in xcode: replace all \U to \u

Reorder UicollectioView items using RealmSwift on drag and drop

本秂侑毒 提交于 2019-12-06 17:12:33
问题 I'm Trying reorder UICollectionViewcell Images on drag and drop using RealmSwift As database, My UI is not updating on a drag and drop and strange behaviour, some Images are duplicating , my code is Like this RealmModel As class StoryAlbumDM: Object { dynamic var id = 0 dynamic var type = "" dynamic var isImage: Int = 0 dynamic var textData = "" dynamic var imageData: NSData? = nil dynamic var rowId: Int = 0 dynamic var position: Int = 0 dynamic var storyId: Int = 0 dynamic var isCoverImage:

UIPasteboard doesn't work in iOS9 Xcode7.0

橙三吉。 提交于 2019-12-06 16:15:07
i want to update my app to make compatible of iOS9.UIPasteboard's methods ware working perfectly till iOS8 but when i run in iOS9 there is no response from UIPasteboard. i mean to say, i'm not getting string or url or images. i read Apple'S Developer Document but can't find something useful.to get string from UIPasteboard i use following method.. id data; data = [UIPasteboard generalPasteboard].image; if(!data){ data = [UIPasteboard generalPasteboard].string; if(!data){ data = [UIPasteboard generalPasteboard].URL; if(!data){ }else{ NSLog(@"\nLast Copied URL:[%@]",data); } }else{ NSLog(@"\nLast

iOS 9 : AVFoundation Export Session is missing audio

情到浓时终转凉″ 提交于 2019-12-06 16:02:21
I'm using the below code snipped while merging videos with original audio. It has been working until I upgraded to iOS9. Anyone faced the same issue and any help to resolve would be greatly appreciated. I couldn't find anything after researching whole day. AVAssetTrack *videoTrack = nil; AVAssetTrack *audioTrack = nil; CMTime insertionPoint = kCMTimeZero; if([[url tracksWithMediaType:AVMediaTypeVideo] count] != 0) { videoTrack = [url tracksWithMediaType:AVMediaTypeVideo][0]; } if([[url tracksWithMediaType:AVMediaTypeAudio] count] != 0) { audioTrack = [url tracksWithMediaType:AVMediaTypeAudio]

navigator.geolocation.getCurrentPosition no longer working in Safari mobile after iOS9 update

限于喜欢 提交于 2019-12-06 13:46:21
I have a web app that has this code for getting the user's coordinates: if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(function(position) { But the moment I updated to iOS9 it ceased to work. I'm not even getting the Safari prompt anymore asking permission to get my location. Anyone else having this issue after updating to iOS9 and was able to resolve it? I've noticed this myself and i'm wondering if iOS 9 Webkit has started to prevent this working via HTTP as I know Chrome will be preventing this shortly as it currently throws the following alert in the web console.

Host supports TLS 1.2, AFNetworking handshake failing

点点圈 提交于 2019-12-06 13:35:44
问题 I am trying to post to a server that supports TLS 1.2 -- at least when I perform a GET in a browser I can verify that the communication uses TLS 1.2 and that the cert is validated by a cert authority. However, when I try to POST in my code to that server using AFNetworking iOS 9.0 (13A4305g) / Xcode 7-beta4 I'm getting a handshake failure. AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager]; manager.requestSerializer = [AFHTTPRequestSerializer

IOS Coredata compatible with both IOS 9 and ios 10

删除回忆录丶 提交于 2019-12-06 13:24:15
Hi I'm developing an app to work with both IOS 10 and 9 (xcode 8). What is the proper way to create new entity object? new IOS 10 has this code var newEvent = Event(context: context) How do we make this code work with both IOS 10 and 9? I'm testing using Mater-Detail template with coredata xcode8 Any additional change should we make to ensure coredata work with both IOS 9 and 10? any help is much appreciate. Thanks 来源: https://stackoverflow.com/questions/39687249/ios-coredata-compatible-with-both-ios-9-and-ios-10