ios8.1

UITableView get titleForHeadersInSection swift

馋奶兔 提交于 2019-12-10 01:36:52
问题 I want to set the title of the header in the section of UITableView. What is the syntax in swift to set the title of the header in the section. func tableView( tableView : UITableView, titleForHeaderInSection section: Int)->String { switch(section) { case 2: return "Title 2" break default: return "" break } } func tableView (tableView:UITableView , heightForHeaderInSection section:Int)->Float { var title = tableView.titleForHeaderInSection[section]; if (title == "") { return 0.0; } return 20

EXC_BAD_ACCESS on iOS 8.1 with Dictionary

倖福魔咒の 提交于 2019-12-09 03:30:52
问题 I have an object accessible via a static var in a struct (workaround for the lack of class variable support in swift right now), structured like this: struct Constants{ static var myObj = MyObject() } MyObject has a dictionary in it like so: class MyObject{ private var params = Dictionary<String,AnyObject>() func addParam(key:String, value:AnyObject){ params[key] = value } } Now on the first call to this object for Contants.myObj.addParam("param", value:123) all is well and params has

iOS8.1.2 didReceiveRemoteNotification method not called when device is not plugged in

笑着哭i 提交于 2019-12-08 11:00:26
问题 In iOS version is 8.1.2,I found a really strange issue: I implement below method to handle push info in appDelegate - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler If your device is not plugged in,this method is not called. 回答1: If you look around, you'll see that others thought it would be a bug in iOS 7.1 beta, fixed in 7.1 release version, but it has probably

Connect to Paired Bluetooth Device iOS8.1

家住魔仙堡 提交于 2019-12-08 06:09:01
问题 Newbie to all things CoreBlooth here. I have successfully written a small app to connect to a Wahoo Blue HR heart rate monitor and retrieve the bpm for my heart rate etc. I used the tutorial below but rewrote the code into swift. Link to tutorial I am now trying to write a simple app to retrieve the Blood Pressure readings from a Bluetooth LE BP reader I have. The model in question is an iHealth BP5. When I scan for this device using the following code I get nothing. func

'+entityForName: nil is not a legal NSPersistentStoreCoordinator for searching for entity name

给你一囗甜甜゛ 提交于 2019-12-07 23:33:07
问题 Getting the exception later in the program when _managedObjectModel is being used. Below is initialiser code. NSURL *modelURL = [[NSBundle mainBundle] URLForResource:self.managedObjectModelName withExtension:@"momd"]; _managedObjectModel = [[NSManagedObjectModel alloc] initWithContentsOfURL:modelURL]; The problem is that _managedObjectModel is pointing to a garbage memory location. After analysing GPR and assembly code i found that the ManagedObjectModel was being initialised properly but,

NSUserActivity handoff not working for custom data

浪子不回头ぞ 提交于 2019-12-06 21:33:52
问题 I'm trying to test out the iOS 8.1 handoff feature with NSUserActivity between my iPhone and my iPad. For this, I tried both implementing my own solution, and to use Apple's PhotoHandoff project. However, it's not working. If I provide a webpageURL , the handover works fine, but when I try to use userData or addUserInfoEntriesFromDictionary nothing works, and I can't for the life of me figure out what the catch is to make the data work. Sample code: NSUserActivity *activity = [[NSUserActivity

Background Fetch Does Not Appear to Fire

廉价感情. 提交于 2019-12-06 08:27:17
问题 First I really appreciate all of the wonderful inputs and comments by all on Stack Overflow. I have read many contributions but have not been able to contribute directly until now. In my app, I have performed the following listed below and have added counter to the app fetch routine to highlight the number of times fetch is called by iOS 8.1. Turned on Background Modes and enabled background fetch. Wrote code for “performFetchWithCompletionHandler”. NSLog message indicate the start and end of

Xcode 6.1 not detecting device iPhone 5s running iOS 8.1

纵然是瞬间 提交于 2019-12-05 15:06:48
问题 My 5s was running fine with Xcode 6.0.1 when I was using iOS 8.0.2. But then I upgraded to iOS 8.1, build my code, and I got an error saying "Xcode cannot run using the selected device. No supported iOS devices are available. Mark an iOS device as 'Use for Development' to run your application or choose an iOS simulator as the destination." So then I figure I need to upgrade to Xcode 6.1, but I still got the same error. The strange thing is under Windows > Devices I can see my iPhone 5s

UITableView get titleForHeadersInSection swift

霸气de小男生 提交于 2019-12-05 01:15:13
I want to set the title of the header in the section of UITableView. What is the syntax in swift to set the title of the header in the section. func tableView( tableView : UITableView, titleForHeaderInSection section: Int)->String { switch(section) { case 2: return "Title 2" break default: return "" break } } func tableView (tableView:UITableView , heightForHeaderInSection section:Int)->Float { var title = tableView.titleForHeaderInSection[section]; if (title == "") { return 0.0; } return 20.0; } func tableView (tableView:UITableView, viewForHeaderInSection section:Int)->UIView { var title =

KIF output: AX Exchange error: Error Domain=Accessibility Code=0 “Remote service does not respond to _accessibilityMachPort”

拈花ヽ惹草 提交于 2019-12-04 20:28:16
问题 When running KIF integration tests on device with iOS 8.1.3 I get lots of diagnostic messages of the following kind as console output: AX Exchange error: Error Domain=Accessibility Code=0 "Remote service does not respond to _accessibilityMachPort" UserInfo=0x1a55de50 {NSLocalizedDescription=Remote service does not respond to _accessibilityMachPort} This occurs during a call to waitForAccessibilityElement:view:withElementMatchingPredicate:tappable: . Otherwise testing works as expected, it