ios9

tableView.dequeueReusableCellWithIdentifier() causes app to hang

我的未来我决定 提交于 2019-12-05 00:11:42
问题 ORIGINAL POST We have recently converted our app to Swift 2.0, and iOS9. One strange issue I am seeing is that calls to tableView.dequeueReusableCellWithIdentifier() cause the app to hang in the simulator. The code func tableView(tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { //hangs on the line below let headersection: HeaderSectionCell = tableView.dequeueReusableCellWithIdentifier("SectionHeader") as! HeaderSectionCell ... return headersection } The header cell

Monitor heart rate from HealthKit --> HKAnchoredObjectQuery only called after applicationDidBecomeActive (BUG or FEATURE?)

折月煮酒 提交于 2019-12-04 23:46:48
问题 I am writing a simple app to monitor the heart rate (HKQuantityTypeIdentifierHeartRate) from HealthKit whenever a new health rate value is written to HealthKit. As seen at WWDC2015 (session 203) I am using a HKAnchoredObjectQuery which should work for adding and deleting objects. Whenever I start the app I am calling the HKQuery for the newest objects and executingQuery which works fine!!! But I am getting no new samples even if the samples are there, but if I bring the app to the background

sublayer with non-finite position [inf inf]

坚强是说给别人听的谎言 提交于 2019-12-04 23:16:29
问题 I am using a third CocoaPods library written in Objective-C to take a screenshot of a UITextView. It was OK for iOS 8, but after I change the syntax for iOS 9 and Swift 2, it throws an error: Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'sublayer with non-finite position [inf inf]' Here is the code from the library: - (UIImage *)screenshotForCroppingRect:(CGRect)croppingRect { UIGraphicsBeginImageContextWithOptions(croppingRect.size, NO, [UIScreen mainScreen]

spritekit ios9 fps drop

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-04 23:09:33
问题 I've noticed a major drop in fps in my sprite kit game having upgraded from iOS 8.4 to iOS 9. Has anyone else encountered this? My texture atlases are still buried away in .atlas files. I've tried to use the asset catalog texture atlas functionality as an experiment and that gives even worse performance. 回答1: Have you tried this? skView.ignoresSiblingOrder = YES; You will probably have to set some zValues explicitly after the change, but the number of draw calls will hopefully be reduced. You

Reorder UicollectioView items using RealmSwift on drag and drop

徘徊边缘 提交于 2019-12-04 21:15:47
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: Int = 0 dynamic var imagePath = "" let allStories = List<StoryAlbumDM>() } On drag and drop I'm doing

Host supports TLS 1.2, AFNetworking handshake failing

我的梦境 提交于 2019-12-04 18:26:37
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 serializerWithContentType:@"application/x-www-form-urlencoded"]; manager.responseSerializer = [AFJSONResponseSerializer

iOS 9 New Launch Images and Icons Sizes, has anyone found the new sizes for the upcoming devices yet?

喜欢而已 提交于 2019-12-04 18:06:11
For iOS 9 has anyone been able to discover what the new launch image and icon sizes will be for the new upcoming iOS devices? I checked the Human Interface Guidelines but they have not listed anything yet https://developer.apple.com/library/prerelease/ios/documentation/UserExperience/Conceptual/MobileHIG/IconMatrix.html#//apple_ref/doc/uid/TP40006556-CH27-SW1 In Xcode 7 I tried adding a new asset catalog in hopes of discovering them but that was without success. I'm not sure when we found out the sizes for the iOS 8 releases new iPhone 6 and 6+ but I thought we knew them around early August

WatchOS 2 (beta 5): watchAppInstalled returns false

霸气de小男生 提交于 2019-12-04 17:39:47
问题 The Watch App is installed on the watch and I can tap and run it on the Watch, but watchAppInstalled method returns false. Also, I can only install the Watch App using Xcode 7. If I try to install the Watch App using the Watch iOS app (from Apple) by turning on the switch, the Watch App gets deleted right after the installation completes. Update: This bug is fixed in Xcode 7 beta 6 回答1: Apple Documentation says: The session must be configured and activated before accessing this property. So,

Local Notification every specific day of week

跟風遠走 提交于 2019-12-04 17:39:32
I need to create a local notification for a specific time (example at 18.00) fired every working day of week (not Saturday and Sunday) but I can't find examples or tutorial. I want use with swift2.1. How can I create this notification? My problem is define the firedate correctly of the notification You can use NSDateComponents to create the exact date for your local notification. Here is the example, how do we create local notification with exact fire date: NSDate *now = [NSDate date]; NSCalendar *calendar = [NSCalendar currentCalendar]; NSDateComponents *components = [calendar components

In 7.3/9/2+ Swift how to disable rotation animation, when device rotates?

时光怂恿深爱的人放手 提交于 2019-12-04 17:25:54
问题 This question is strictly about iOS9+ Say you have an ordinary modern app (autolayout, storyboard, universal) which does allow all four rotation positions you want it to autorotate in the normal way, so it will change to your new constraint-based layouts when user rotates device from landscape to portrait But you simply want NO animation during the user rotating the device. You want it to just "click" to the new sideways or upright layout. The only way I have been able to achieve this is by