ios7

IOS 7 - add overlay crash app

家住魔仙堡 提交于 2019-12-24 09:49:58
问题 I am in a process of moving my app to IOS 7 . I have a map and on that map I draw MKPolyLine . Everything worked until IOS 7 now app crash. I have changed viewForOverLay with new method: - (MKOverlayRenderer *)mapView:(MKMapView *)mapView rendererForOverlay:(id < MKOverlay >)overlay { if ([overlay isKindOfClass:[MKPolyline class]]) { MKPolyline *route = overlay; MKPolylineRenderer *routeRenderer = [[MKPolylineRenderer alloc] initWithPolyline:route]; routeRenderer.strokeColor = [UIColor

How to run or execute an SKAction from outside of the object?

荒凉一梦 提交于 2019-12-24 08:58:29
问题 I have some code like following: -(void) createBall { _ballSprite = [SKSpriteNode spriteNodeWithImageNamed:@"ball0001"]; _ballSprite.position = CGPointMake(firstNode.position.x, firstNode.position.y); SKAction *ballScale =[SKAction scaleXTo:-0.5 duration:0]; SKAction *ballMove = [SKAction moveByX:0 y:-300 duration:0]; SKAction *ballMoveScale = [SKAction sequence:@[ballScale,ballMove]; SKAction *ballScaleMove = [SKAction sequence:@[ballMove,ballScale]; //Unused variable [_ballSprite runAction

iOS 7 Significant location change launch after termination

。_饼干妹妹 提交于 2019-12-24 08:49:04
问题 My app automatically wakes up after termination when new location data arrives on iOS 6, but not on iOS 7. [[UIApplication sharedApplication] setBackgroundRefreshStatus] is UIBackgroundRefreshStatusAvailable . In Info.plist I set UIBackgroundModes with value "location". CLLocationManager started this way: - (void) start { if (locationManaher == nil) { locationManager = [[CLLocationManager alloc] init]; locationManager.delegate = self; locationManager.desiredAccuracy =

Game Center in IOS 7 leaderboard

徘徊边缘 提交于 2019-12-24 08:27:09
问题 I have successfully added Game Center capabilities to my app. When the app is opened it successfully authenticates the user and shows the "Welcome back (UserName)" banner. However, I am not sure of how to add a leaderboard to the game. I was wondering if someone could help me A: Help me understand how to link the leaderboard i made in iTunes connect with the app and make highscore the value of the leaderboard. And B: Make the leaderboard show up in the app with all the rankings. All the code

ios app not fitting iphone 5 screen

隐身守侯 提交于 2019-12-24 08:21:23
问题 My ios app does not fit on iphone 5 screen. When I run the app, I can see blank space at the top and bottom of the screen. I have made the app compatible for both iphone sizes. But Since I have updated to the latest xcode, I am facing this issue. See screen shot. Can any one please help? 回答1: You probably may not have set your Default-568h image. 回答2: On the simulator make sure you have set to iPhone (Retina 4-inch). You can do this by going simulator menu at the top go to Hardware->Device-

iOS UIBarButtonItem alignments

和自甴很熟 提交于 2019-12-24 07:10:10
问题 In my app I added two UIBarButtonItem with navigation bar. In iOS6 and below it looks like this But when I run my app in iOS7 it looks like issue is: refresh button goes down. So please help me to display refresh button equal to 'today' button. Below is the code I'm using , UIBarButtonItem* todayButton = [[UIBarButtonItem alloc] initWithTitle:@"Today" style:UIBarButtonItemStyleBordered target:self action:@selector(showTodayAction:)]; UIBarButtonItem *refreshButton = [[UIBarButtonItem alloc]

Getting nil value for the variable in Unit Test using XCTest

冷暖自知 提交于 2019-12-24 06:44:45
问题 The appDelegate instance is showing nil value, test case "testAppDelegate" is getting failed. The same is working in the sample code provided by apple developer site but there SenTestCase is being used, please help me out, even the target is set as per the WWDC 2013 video "Testing in Xcode 5 session 409" @interface Tests : XCTestCase { AppDelegate *appDelegate; AppViewController *appVC; UIView *appView; } @end @implementation Tests - (void)setUp { [super setUp]; appDelegate = [[UIApplication

App works fine with developer build with xcode. But crashes when run using ipa file

佐手、 提交于 2019-12-24 06:01:05
问题 My app works fine in device from xcode. But crashes when run using ipa file. When I checked the console using organizer, the following error has been displayed Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UINibDecoder setScrollEnabled:]: unrecognized selector sent to instance I have used UIPageViewController that displays data in UITextView. Data has been added dynamically using NSOperation to the array , which has been used to display in UITextView. The

UINavigationContoller swipe back function not working if its view is added to UIViewContoller

和自甴很熟 提交于 2019-12-24 06:00:37
问题 I have a UIViewController(RootViewController) set as the root view controller of the UIWindow. Any view / view controller is added to this RootViewController subview including a UINavigationController. I found that there is a new behaviour in iOS7 for UINavigationController that you can swipe back to the previous view controller. But it doesn't not work for my case. If I set the UINavigationController as the root view controller of the UIWindow. It works. So my questions is why can't it swipe

infowindow not displaying with marker in didTapAtCoordinate method

半世苍凉 提交于 2019-12-24 05:10:22
问题 i am trying to show infowindow and marker both simultaneously. code -(void)set_markerOnMap:(double)lat longitude:(double)lon{ GMSMarker *marker = [[GMSMarker alloc] init]; marker.title = @"Location selected"; marker.position = CLLocationCoordinate2DMake(lat, lon); marker.snippet = @"Testing"; marker.icon=[UIImage imageNamed:@"red-pin.png"]; marker.map = self.MyMapView; [self.MyMapView setSelectedMarker:marker]; } - (void)viewDidLoad { [super viewDidLoad]; [self set_markerOnMap:21.214894