ios6

Can't type text into UITextField or UITextView in iOS6

夙愿已清 提交于 2019-12-04 22:38:49
In one of my apps, when I try to edit (type some text) UITextField , UITextView or any other 'text-able' UIControl the cursor just blinks but no characters are typed in except BACKSPACE (possible only when I have some initial text in it), RETURN and switching character types. This goes to all controls across whole application. Summary: It happens only from iOS 6.0 (does not occur on iOS 5.x, 4.x neither Simulator or real device) All delegate methods are fired (shouldBeginEditing: didBeginEditing:) except shouldChangeCharactersInRange: isFirstResponder flag is behaving set correctly

Push to root View controller in UIStoryboard

坚强是说给别人听的谎言 提交于 2019-12-04 22:33:18
I have hierarchy of ViewControllers in my storyboard structure. It is A-B-C-D . A is embed with NavigationController and the flow goes on till D viewController . All fours view attached through segues. Now I am on D viewController , I defined some action to the button of D that It should take me directly to A viewController that is rootViewController or B viewController . Then how can I achieve this. I tried everything but didn't succeed. I want something like it should not disturb A-B-C-D flow and it should take me to A viewController from D . Right click on your D viewcontroller and drag i

ios 7 tableView didSelectRowAtIndexPath shows blank data on first selection

余生长醉 提交于 2019-12-04 21:52:24
I have some apps designed for iOS 6 and today I went to upgrade them to iOS 7. They are a simple table view lists and when a record is selected it displays details about that row on another screen. This worked flawlessly in iOS 6. With iOS 7 when I select a row it shows a blank data page on the first selection. If I then go back to the list and reselect the item it then displays the proper data.. After this first blank display it will work fine for any other records .. I am racking my brain and can not for the life of me figure out why this is happening. Any ideas? CODE: - (void)tableView:

viewWillAppear called twice with custom segue animation using transitionFromView

为君一笑 提交于 2019-12-04 21:36:51
问题 I'm looking to perform a segue to replace the window's root view controller by another view controller using a curl up animation. The idea is that I have a SplashViewController being displayed for a couple of seconds before transitioning ( performSegueWithIdentifier: ) to the next one, LoginViewController , using the curl up animation. I've created a custom UIStoryboardSegue class called AnimatedSegue . Here is the code of the overridden perform method: - (void)perform { UIViewController

Use a button on a UICollectionViewCell to display data from an array

自闭症网瘾萝莉.ら 提交于 2019-12-04 21:31:32
问题 I have an array of NSStrings , one UILabel & a UICollectionView . My Question: I want the array's count to determine how many UICollectionViewCell 's there are. Each UICollectionViewCell contains a button. Upon click, I want this button to cause the data in the array that corresponds to the UICollectionViewCell 's number to be displayed in the label. For example, if the user clicks on the 13th UICollectionViewCell 's button, then the 13th NSString in the array would become the UILabel 's text

Button background and gradient change since iOS6

浪尽此生 提交于 2019-12-04 21:02:10
问题 For an app I had to create a UIButton filled with a gradient and a background image. Everything worked fine until I upgraded the OS from iOS 5.1 to the recently released iOS 6. Here are two screenshots from the simulator : Well, the first screenshot shows what I need (and did), you can see a brown background and the grey radient. Below is the screenshot with the same buttons but with iOS 6 running. As you can see the gradient has vanished and a strange white strip has appeared at the bottom

How do you prevent fullscreen video rotation in iOS 6

本小妞迷上赌 提交于 2019-12-04 20:31:39
I have an app whose rotation configuration is defined dynamically, therefore I cannot set the supported rotations in the project file. Therefore I have to handle the new shouldRotate methods (thanks Apple!!) But despite having overriden these and prevented the full UI from displaying in anything but portrait. When a video view is displayed fullscreen and rotated. The video will rotate to landscape still. Is there another way to preview the video specifically from rotating at all? Here's an implementation using a MPMoviePlayerViewController subclass supporting portrait and portrait upside down

How can I supersede the built-in swipe gesture recognizer in UICollectionView?

佐手、 提交于 2019-12-04 20:27:32
We're building an app that takes advantage of the new UICollectionView in iOS 6. However, we need to implement a long-press behavior such that even if the user then moves their finger after, we want it ignored. i.e. User touches the screen than instantly moves -> Swipe User touches the screen, pauses, then moves -> Ignore swipe and wait for the release. Basically, we only want to allow the built-in swipe gesture to be enabled if our gesture recognizer fails. However, we're not sure how to supersede the built-in swipe gesture recognizers with that 'Other recognizer must fail first' logic. We're

I have a UICollectionView and i want to show an image in a Cell, that goes to a normal ViewController. How do i do that?

霸气de小男生 提交于 2019-12-04 19:47:14
I have a UICollectionViewController (with a navigation controller) and i want to show an image in a Cell that 'pushes' to a normal ViewController (different by every image). How do i do that? Seem you want to build photo gallery by UICollectionView. If use storyBoard, use segue - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if ([[segue identifier] isEqualToString:@"showDetail"]) { NSIndexPath *selectedIndexPath = [[self.collectionView indexPathsForSelectedItems] objectAtIndex:0]; // load the image, to prevent it from being cached we use 'initWithContentsOfFile' NSString

IOS & Objective C - how can i resolve this error “implicit declaration of function ”class_getname “ is invalid in c99”?

*爱你&永不变心* 提交于 2019-12-04 19:41:53
Actually there are two errors, the first one is : "implicit declaration of function "class_getname " is invalid in c99" The second one is : incompatible integer to pointer conversion initializing 'const char*' with an expression of type 'int' my method is : -(void) donneesrecoltees:(NSData *)donnees { NSError *erreur; NSNumber *lastMessage,*currentMessage; //int i; NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults]; NSString *msg; UIAlertView *alert; NSDictionary *json=[NSJSONSerialization JSONObjectWithData:donnees options:0 error:&erreur]; // Check if it's the right class to