ios8

Today App Extension Widget Tap To Open Containing App

自作多情 提交于 2019-12-17 07:14:52
问题 I've implemented a Today widget for my application +Quotes which displays the day's quote within the notification center with the help of these Apple Docs. What I'd like to accomplish is opening the Containing App, in this case +Quotes, when the user taps the +Quotes widget within their Today notification view, not entirely sure what to call this, as Calendar would if you tapped it in the Today view. I've tried overlaying a button over the label which would call -(void)openURL:(NSURL *)URL

Displaying search bar in navigation bar in iOS 8

╄→гoц情女王★ 提交于 2019-12-17 07:12:47
问题 UISearchDisplayController had a boolean property called displaysSearchBarInNavigationBar . What's the equivalent in iOS 8 to have my search bar move up there? Any guidance is greatly appreciated. Here's my code, I'm not entirely sure why this isn't working. When I click the search bar, it just disappears instead of moving itself and the navigation bar up. import UIKit class ViewController: UIViewController, UISearchResultsUpdating, UISearchControllerDelegate, UISearchBarDelegate,

Ask for User Permission to Receive UILocalNotifications in iOS 8

牧云@^-^@ 提交于 2019-12-17 06:59:37
问题 I have set up local notifications in the App Delegate Using this: - (void)applicationDidEnterBackground:(UIApplication *)application { UILocalNotification *notification = [[UILocalNotification alloc]init]; [notification setAlertBody:@"Watch the Latest Episode of CCA-TV"]; [notification setFireDate:[NSDate dateWithTimeIntervalSinceNow:5]]; [notification setTimeZone:[NSTimeZone defaultTimeZone]]; [application setScheduledLocalNotifications:[NSArray arrayWithObject:notification]]; } When I run

Error: Error Domain=NSURLErrorDomain Code=-1001 “The request timed out.”

六眼飞鱼酱① 提交于 2019-12-17 06:47:10
问题 I am working on an application in Xcode 6.1, iOS 8.1; the application was working completely fine till 2 days before, but today as I executed it I got an error in the web service & the error is printed below. Error: Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo=0x7c6899b0 {NSErrorFailingURLStringKey=, NSErrorFailingURLKey=, NSLocalizedDescription=The request timed out., NSUnderlyingError=0x7c688f60 "The request timed out."} I had used AFNetworking 2.x and

Change Text Color of Items in UIActionSheet - iOS 8

拈花ヽ惹草 提交于 2019-12-17 06:35:13
问题 I had been using following code to change text color of items which I add in UIActionSheet .: - (void)willPresentActionSheet:(UIActionSheet *)actionSheet { for (UIView *subview in actionSheet.subviews) { if ([subview isKindOfClass:[UIButton class]]) { UIButton *button = (UIButton *)subview; [button setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; } } } It works fine in iOS7 , but in iOS8 the above code doesn't change the text color of items. Now my question is how to change

NSUserDefaults not cleared after app uninstall on simulator

。_饼干妹妹 提交于 2019-12-17 06:34:20
问题 this may sound real NOOB! I want to check if it's the second time the user enters my application, so to keep the run count I'm using NSUserDefaults . I have implemented the following code in my rootViewController 's viewDidLoad method: NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; NSLog(@"hello %ld", (long)[userDefaults integerForKey:@"runCount"]); if ([userDefaults integerForKey:@"runCount"] != 1) { //not the 2nd run [userDefaults setInteger:1 forKey:@"runCount"];

Remove SeparatorInset on iOS 8 UITableView for Xcode 6 iPhone Simulator

*爱你&永不变心* 提交于 2019-12-17 06:25:30
问题 I found a weird white space on UITableView for iPhone 6 Simulator (iOS 8) on Xcode 6 GM. I have tried to set the SeparatorInset from both storyboard and also the code, but the white space is till there. The following code works on iOS 7 but not on iOS 8 (iPhone 6 simulator). -(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath{ if ([tableView respondsToSelector:@selector(setSeparatorInset:)]) { [tableView

iOS 8 Auto cell height - Can't scroll to last row

隐身守侯 提交于 2019-12-17 06:24:13
问题 I am using iOS 8 new self-sizing cells. Visually it works good - each cell gets its right size. However, if I try to scroll to the last row , the table view doesn't seem to know its right size. Is this a bug or is there a fix for that? Here's how to recreate the problem: Using this project - TableViewCellWithAutoLayoutiOS8 (referenced from this SO answer), I got the auto-resizing cells as expected. However, if I am calling the scrollToRowAtIndexPath function, like this: tableView

“Untrusted App Developer” message when installing enterprise iOS Application

丶灬走出姿态 提交于 2019-12-17 05:45:25
问题 I'm developing an enterprise application. When I was testing it in iOS8 beta I saw the following alert view: Untrusted App Developer Do you trust the developer "iPhone Distribution: ---" to run apps on you iPad? It only appears the first time. Can I avoid it somehow? And what is it related to? 回答1: You cannot avoid this unless you distribute an application via the App Store. You get this message because the application is signed via an enterprise certificate that has not yet been trusted by

Implement PushKit and test in development behavior

孤人 提交于 2019-12-17 05:45:09
问题 i'd like to implement PushKit service within my app ( Voip app ), but i have following doubt: I see that i can generate only production voip certificate , it works if i try to test voip push notification service on develop device ? This is my implementation test: With this 3 line of code i can get push token on didUpdatePushCredentials callback that i use to save into my server. PKPushRegistry *pushRegistry = [[PKPushRegistry alloc] initWithQueue:dispatch_get_main_queue()]; pushRegistry