ios7

How can I stop an UIViewAnimationOptionRepeat UIView Animation?

故事扮演 提交于 2019-12-10 21:27:05
问题 I have the following code inside of a UIView subclass: [element setAlpha: 0.0f]; [UIView animateWithDuration: 0.4 delay: 0.0 options: UIViewAnimationOptionCurveEaseOut | UIViewAnimationOptionAutoreverse | UIViewAnimationOptionRepeat animations: ^{ [element setAlpha: 1.0f]; } completion: ^(BOOL finished){ if (finished) { return; } }]; Then when I want to stop the Animation I send the following message to the View itself: [[self layer] removeAllAnimations]; But it does nothing... How can I stop

iOS 7 vs iOS 8 Constraints differ in sizes

∥☆過路亽.° 提交于 2019-12-10 21:25:41
问题 While working with Auto Layout and Constraints in the Interface Builder, I noticed that I am getting different results with the same constraints when I run iOS7 vs iOS8 simulator. For example, I have a very simple Trailing Constraint set on a UIButton of 8pts. These 8pts look very different in placement when running on iOS7 vs iOS8 simulator. iOS8 simulator seems to add a few points to the constraint. It's as if there needs to be functionality for Constraint Delta's... Any ideas why

Access paging in iOS - previous and next : retrieved in JSON from facebook graph-api

ⅰ亾dé卋堺 提交于 2019-12-10 19:51:24
问题 Access paging in iOS Code from JSON previous and next link In JSON object retrieved from graph api, due to loads of information the information is paged, when I try to access the previous and next link it gives OAuth error. Can anyone help in how to access the link through objective C in iOS app. I want to know two things - how to retrive 'N' items using --> limit=N and how to open a FBSDKgraphrequest and using the paged link link (containing the paging information) paging = { next = "https:/

Remove Padding from UIActionSheet Popover

送分小仙女□ 提交于 2019-12-10 19:47:17
问题 I am creating a UIActionSheet to allow users to Take or Select a photo. Can someone tell me why it does not display the same as Apple's? This is for the iPad, so I have not declared a Cancel button. UIActionSheet *actionSheet = [[UIActionSheet alloc] init]; actionSheet.delegate = self; [actionSheet addButtonWithTitle:NSLocalizedString(@"choosePhotoPopoverButton", @"Choose Photo - Get a photo from the album.")]; if ([UIImagePickerController isSourceTypeAvailable

iOS7 tab bar custom icon height - height reduces until icon gets invisible

自闭症网瘾萝莉.ら 提交于 2019-12-10 19:18:27
问题 I implemented tab bar with custom icon sizes to match the design: The first and the last icon sizes are reduced to fit below the circle line by setting the bar item sizes as follows: The strange behaviour that happens only on iOS7+ is that when the user taps already active resized tab bar icon for the second time - it gets reduced in size: And if I tap on it again - it's size is so small that it appears invisible: This doesn't happen on iOS5 or iOS6. Is there something that I'm doing wrong

UISegmentedControl truncates segment titles

送分小仙女□ 提交于 2019-12-10 19:09:46
问题 I have a segmented control in my iPhone app that works great on ios6 but on ios7 the segment tiles are truncated (there is enough space for the text, but it truncates them anyway) self.segmentedControl.segmentedControlStyle = UISegmentedControlStyleBar; self.segmentedControl.autoresizingMask = UIViewAutoresizingFlexibleWidth; NSDictionary *defaultTextAttributes = [NSDictionary dictionaryWithObjectsAndKeys:defaultFont, UITextAttributeFont, defaultFontColor, UITextAttributeTextColor, nil];

iOS 7.1 crash if heightForRowAtIndexPath is not declared

戏子无情 提交于 2019-12-10 18:36:19
问题 I was trying to use estimatedHeightForRowAtIndexPath for dynamic cell height with AutoLayout and working as expected in iOS8 but crush in iOS7.1 by saying this: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[MyProject.ViewController tableView:heightForRowAtIndexPath:]: unrecognized selector sent to instance 0x79e91350' If I define heightForRowAtIndexPath , error go away but cell won't auto size itself. Any idea? Update: It's indeed available in iOS 7.0,

How to check does method systemFontOfSize(fontSize: weight:) exist in iOS

百般思念 提交于 2019-12-10 18:31:58
问题 My application deployment target is iOS 7.0 I want to use method systemFontOfSize(fontSize: weight:) on devices with iOS 8+. iOS 7 doesn't support this method (with weight: parameter) and my application crashes. Specially for iOS 7 I want to set Helvetica Light font instead of SystemFont Light. What is the best way to check it? Do I need to check iOS version or I can check the method? how? I use swift and tried if let font = UIFont.systemFontOfSize(12, weight: UIFontWeightLight) or

strcpy behaving differently on ios7

百般思念 提交于 2019-12-10 18:24:32
问题 IOS7 seems to come with a new implementation (optimisation maybe) of strings strcpy. Before I was able to copy strings from any position of the array but now if I start copying from any position where (i % 4 != 0) it will crash. To show this I ran this code both in iOS6 and 7, and it crashed the app on 7: char *x = malloc(1024); strcpy(x, "hello world"); char *x2 = x + 1; strcpy(x, x2); what am I doing wrong? 回答1: The C11 standard says at §7.24.2.3: The strcpy function copies the string

Storyboard-set iOS 7 Status Bar not shown in right style

一曲冷凌霜 提交于 2019-12-10 18:01:45
问题 I have two Scenes in a Storyboard; a dark one and a light one. Set to Default in the Simulated metrics' Status Bar section, the light scene's bar is dark and works correctly. The dark scene's is set the same way to Light Content style but it doesn't change. No mention of the bar anywhere in the code itself, what's wrong? 回答1: The simulated metrics is only for XCode. You need to set this for the view in the views viewcontroller. UIViewController:preferredStatusBarStyle StackoverFlow question