viewdidappear

UIScrollView does not restore properly

半腔热情 提交于 2019-12-08 05:48:52
问题 I have a Scrollview, it's properties are set in viewDidAppear. Now when I get to the Scrollview first time there isn't any problem. However I have buttons that are assigned to UINavigationController. So when I press into one of them UINavigationController opens up, when I close the navigation controller, ScrollView does not restore properly. It basically aligns the centre of the screen as previously pressed button location. So if I try to scroll up it does not. I have tried using this in my

UIImagepickerController [takepicture] modal view disappears no delegate callback

巧了我就是萌 提交于 2019-12-06 12:46:10
问题 Update: This has been answered. It was my own stupidity, possibly not worth reading any more of this question. lol. Question: Right so i have this UIViewController(master) subclass, it has a UIImagepickerController(camera), it also has a UIView(overlayView). Master setups the camera to be configured as a camera only with a custom cameraOverlay, hiding the custom controls e.t.c. All appears to work fine apart from when i try to programatically take a picture. What happens is the overlayView

UIViewController's viewDidAppear not being called after a modal close

别说谁变了你拦得住时间么 提交于 2019-12-06 06:04:53
问题 A UIViewController (View A) invokes another view controller (View B) by invoking it as a modal control. [self presentModalViewController:ViewB animated:TRUE]; And View B exists by invoking: [self dismissModalViewControllerAnimated:TRUE]; When this occurs everything looks right EXCEPT that View A's viewWillAppear and viewDidAppear does not get called (they are called during app init though). Weird thing is... i believe ive done this before, but im not sure what is going on now. Is there

iOS 6 maps- not animating PIN drop

拟墨画扇 提交于 2019-12-06 04:42:05
I have created a custom MKAnnotation class and it has been working - until iOS 6 came out. Since then my pins get added to the apple map but now without a drop animation! Is this how it is set or there maybe an an issue with the way I'm doing things. I have set a delay of 1 sec until the method that adds the annotations to the map is called, so I can see if the drop animations are actually occurring before the view appears - still, the pins just appear out of nowhere without dropping. Here's the code I'm using: -(MKAnnotationView *) mapView:(MKMapView *)mapView viewForAnnotation:(Annotation*

How to add an animation to the UIView in viewDidAppear?

亡梦爱人 提交于 2019-12-06 00:39:01
问题 I tried to add a animation to viewDidLoad and viewDidAppear, but it doesn't work: - (void)viewDidAppear:(BOOL)animated{ [UIView beginAnimations:@"transition" context:NULL]; [UIView setAnimationTransition:110 forView:self.view cache:YES]; [UIView commitAnimations]; } Why? 回答1: I had the same problem and I think I found the solution on this SO question. When viewDidAppear gets called you still don't see anything on the screen (despite the name), but you are about to. You can then use a

UIImagepickerController [takepicture] modal view disappears no delegate callback

断了今生、忘了曾经 提交于 2019-12-04 19:39:59
Update: This has been answered. It was my own stupidity, possibly not worth reading any more of this question. lol. Question: Right so i have this UIViewController(master) subclass, it has a UIImagepickerController(camera), it also has a UIView(overlayView). Master setups the camera to be configured as a camera only with a custom cameraOverlay, hiding the custom controls e.t.c. All appears to work fine apart from when i try to programatically take a picture. What happens is the overlayView calls the master and this triggers the take picture, then i hear the shutter sound and the iris closes,

UIViewController's viewDidAppear not being called after a modal close

你。 提交于 2019-12-04 10:26:04
A UIViewController (View A) invokes another view controller (View B) by invoking it as a modal control. [self presentModalViewController:ViewB animated:TRUE]; And View B exists by invoking: [self dismissModalViewControllerAnimated:TRUE]; When this occurs everything looks right EXCEPT that View A's viewWillAppear and viewDidAppear does not get called (they are called during app init though). Weird thing is... i believe ive done this before, but im not sure what is going on now. Is there anything obviously wrong that im doing? Thanks! * UPDATE * I just now learned that this behavior only occurs

Difference between viewDidAppear, viewDidLoad in iPhone/iOS? [duplicate]

不羁的心 提交于 2019-12-04 05:42:40
This question already has answers here : Closed last year . Difference between viewDidLoad and viewDidAppear (2 answers) Bottom line is, I've been working on an app, and it seems that if I place a UIAlert in viewDidLoad , it gets called twice (from a delegate method of UIImagePickerController ). If I put it in viewDidAppear , it gets called once. I've looked through documentation but it just confuses me. A UIView object can get loaded into memory and released multiple times without ever getting added to the view stack and appearing on the display. My guess is that you have 2 references to this

How to add an animation to the UIView in viewDidAppear?

百般思念 提交于 2019-12-04 04:03:28
I tried to add a animation to viewDidLoad and viewDidAppear, but it doesn't work: - (void)viewDidAppear:(BOOL)animated{ [UIView beginAnimations:@"transition" context:NULL]; [UIView setAnimationTransition:110 forView:self.view cache:YES]; [UIView commitAnimations]; } Why? jackbravo I had the same problem and I think I found the solution on this SO question . When viewDidAppear gets called you still don't see anything on the screen (despite the name), but you are about to. You can then use a performSelector:withDelay or an NSTimer to launch your animation. The delay can just be 0.1 and your

Correct time to call viewDidAppear manually?

限于喜欢 提交于 2019-12-03 14:28:53
I have a UITableViewController in my app, which is added to the view hierarchy directly. After the view appears, I want to scroll to a specific cell. My solution would be to call the code for scrolling in -[viewDidAppear] . According to Apple's docs I have to call the method manually: If the view belonging to a view controller is added to a view hierarchy directly, the view controller will not receive this message. If you insert or add a view to the view hierarchy, and it has a view controller, you should send the associated view controller this message directly. The question is: When is the