ios7

GameKit GKMatchMaker inviteHandler deprecated in iOS7, what is the replacement?

房东的猫 提交于 2019-12-12 15:13:27
问题 [GKMatchmaker sharedMatchmaker].inviteHandler is deprecated in iOS 7, yet the GameKit guides still say to set it up that way. Does anyone know what we're supposed to be using for iOS 7 real time game invites? There are new classes / methods for several listener classes, but none address this specifically that I have seen. 'inviteHandler' is deprecated: first deprecated in iOS 7.0 回答1: It looks like the intended replacement is the GKInviteEventListener protocol. You can see a reference to it

shouldChangeCharactersInRange call twice

不打扰是莪最后的温柔 提交于 2019-12-12 13:55:23
问题 Sometimes, shouldChangeCharactersInRange is called twice when I hit only one character. As an exemple, i enter 'avion par c', the procedure is called and add me a second 'c' result is 'avion par cc' - How can I avoid that ? This happened only since I migrate the application to iOS 7, xCode 5. - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string { wordSearching = YES; if ([string isEqualToString:@"\n"]) { [self

ios7 navigationController pushViewController animated bug

蹲街弑〆低调 提交于 2019-12-12 13:21:19
问题 It looks like I found a bug in the navigationController pushViewController method. To recreate it I took the sample master detail project and made some changes to the -didSelectRow: method: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { DetailViewController* view = [self.storyboard instantiateViewControllerWithIdentifier: @"view"]; NSDate *object = _objects[indexPath.row]; [view setDetailItem:object]; [self.detailViewController

tableView didSelectRowAtIndexPath doesn't work properly on iOS 7. Why?

寵の児 提交于 2019-12-12 13:17:43
问题 In first place I would like to say that I'm only making this question, because I would like to understand what is happening. I opened an old Xcode project (a very simple one) in a fresh installation on Xcode5. When I realize that it doesn't work on iOS 7. Why? Don't know.. I saw some other questions, didn't get any useful answer, so I made a simple test. In the UITableViewController all works fine except on didSelectRowAtIndexPath Check it out RootViewController.h: @interface

UIWebView log message iOS 7 [duplicate]

时光总嘲笑我的痴心妄想 提交于 2019-12-12 13:06:26
问题 This question already has answers here : UITextField -webView no longer supported (2 answers) Closed 5 years ago . I am developing an app that use web browser after I built it I got this message: UITextField -webView called. This method is no longer supported with the new text architecture So what do I need to use right now? 回答1: Previously, UITextfield used a UIWebView internally for rendering rich text. This has been done away with the release of TextKit (or as they say it, "the new text

How can I enable iAd when using Sprite Kit?

一世执手 提交于 2019-12-12 12:41:34
问题 In IOS 7, we can enable iAd very easy when using: self.canDisplayBannerAds = YES; in code ViewDidLoad of UIViewController However, I cannot use this in my ViewController (the ViewControl that load SKScene). My game is crash when loading. So how can I active iAd in my game (using Sprite Kit)? 回答1: You can only show iAd in a UIViewController subclass. You are doing it right. Put the following code in your UIViewController and not in the SKScene. Please refer to this tutorial for the exact code:

iOS Keychain Data Lost Upon iPhone Memory Pressure?

☆樱花仙子☆ 提交于 2019-12-12 12:11:11
问题 I'm running an iOS app via a debugger on my iPhone 5s. I'm using the keychain to store a password (I'm using the KeychainItemWrapper example from Apple to store and retrieve my keychain items). About 99.99% of the time, the keychain retrieval works perfectly. However, there have been two cases in which my application could not get the password. For example, once, my phone was experiencing memory pressure and I had to restart the phone and relaunch the app. Upon the app relaunch, my app could

UIScrollView do not scroll

守給你的承諾、 提交于 2019-12-12 11:56:51
问题 I have a UIScrollView that do not scroll at all. If I enable bouncing, I can scroll far enough to the sides to see that there is content outside of the view, but it snaps right back to the origin when I release. I have paging turned on, but I get the same behavior if I turn it off. I have auto layout turned off. In the IB, the scrollView is in a MainViewController, correctly linked up to the IBOutlet as below. @interface MainViewController () @property (strong, nonatomic) IBOutlet

UITableViewCell custom CG drawing iOS 7

本小妞迷上赌 提交于 2019-12-12 11:48:57
问题 I have a UITableViewCell subclass with the following drawRect: implementation. It will draw a line at the bottom of the cell, indented by 30 points to match our design. The tableView.separatorStyle is set to UITableViewSeparatorStyleNone in lieu of this custom drawing. - (void)drawRect:(CGRect)rect { [super drawRect:rect]; if (!_hideBottomLine) { CGContextRef ref = UIGraphicsGetCurrentContext(); CGContextSetShouldAntialias(ref, NO); CGContextSetStrokeColorWithColor(ref, [UIColor

Get IMEI for iOS7 programmatically

强颜欢笑 提交于 2019-12-12 11:35:03
问题 in XCode 4.6, iOS 6.1, we use CoreTelephony to obtain IMEI, the same way mentioned in get IMEI on iPhone with CoreTelephony? question, but after switching to iOS7 and XCode 5 it doesn't work anymore. My system considers IMEI as an unbreakable way to identify a cellphone and guarantee it is linked to a specific user, also other security issues depend on this identifier. With the new iOS the code is not working and we hadn't found a way to obtain it. My central question is: What options do I