modalviewcontroller

Why tintColor doesn't work on navigation bar or toolbar on iOS7

百般思念 提交于 2019-12-04 06:34:43
问题 On iOS7 of iPad, first, I setup an modal view controller, the size is 320 * 460, then, in this modal view controller, I presented another navigation view controller, after this, the tint color of navigation bar and tool bar of the presented navigation controller turns gray. I have tried to set tint color of navigation bar and tool bar, but it just doesn't work. Then I tried to present the navigation controller directly, then all tint color works both on navigation bar and tool bar. I have

don't want the modal view to move up on keyboard show

独自空忆成欢 提交于 2019-12-04 04:33:07
问题 I have a viewcontroller from here I am getting a popover. From this popover i am presenting a view as modal view. There is a textview in it. When editing begins, the entire modal view moves up (which usually people desire). But I do not want it that way. Is there any way, i can block my modal view from moving up and down on keyboard show and hide ? 回答1: If I guessed correctly then you need to set yourviewControler.modalPresentationStyle=UIModalPresentationPageSheet; instead of what you are

How can I keep the keyboard present even when presenting a modal view controller?

十年热恋 提交于 2019-12-04 02:19:47
问题 I've got a modal view controller that is presented and a UITextView becomes the first responder and the keyboard is shown. Once this screen is loaded, the user can categorize their input before submitting it. This happens by way of another modal view controller that is presented on top. When this second one is presented, the keyboard is dismissed, the user chooses, and then reappears when the initial UITextView becomes first responder again. How can I present the second modal view controller

isBeingDismissed not set in viewWillDisappear:

给你一囗甜甜゛ 提交于 2019-12-04 01:58:41
I have some code to clean up in my viewWillDisappear: , which I only want to use when the view is moving back to the parent view controller. - (void)viewWillDisappear:(BOOL)animated { if ([self isMovingFromParentViewController] || [self isBeingDismissed]) { NSLog(@"isMovingFromParentViewController or isBeingDismissed"); // clean up } [super viewWillDisappear:animated]; } The view can be presented in two ways: it can be pushed by a navigation controller, or presented as a modal view controller (from the same navigation controller). If it's pushed, then popped (pressing the back button), my

UIModalTransitionStyle horizontal movement

可紊 提交于 2019-12-03 22:50:30
问题 The UIModalTransitionStyle is either Vertical, Flip or Dissolve. I would like it to be right to left or left to right, like if you click on a disclosure button on a MapKit callout or in a navigation based app. 回答1: This is impossible as transition for a modal viewController, but you could use a CATransition with a type of kCATransitionMoveIn or kCATransitionPush and a subtype of kCATransitionFromRight CATransition* trans = [CATransition animation]; trans.type = kCATransitionPush; trans

iOS : ModalView with background transparent?

一世执手 提交于 2019-12-03 18:32:32
问题 I want to show a modalview on a viewController. (which has a naviguation controller). On my view i have text, and a button to show the modalview. I created a .xib which contained my modalview (it's a view with an image and a label). When i show it, with that : ShareController *controller = [[ShareController alloc] initWithNibName:@"ShareController" bundle: nil]; controller.view.backgroundColor = [UIColor clearColor]; controller.modalPresentationStyle = UIModalPresentationFormSheet; controller

REALLY strange app color behavior?

佐手、 提交于 2019-12-03 17:52:19
问题 On appDidFinishLaunchingWithOptions, I tint my entire app red with the following code. self.window.tintColor = [UIColor otfRedColor]; This works perfectly, and when my app loads, all the navigation bar items are red. A is my root view controller. I have 3 view controllers, a, b, and c. A pulls up a modal presentation view sheet of b which pulls up a full modal view of c. When C is pulled up, the bar button items on navigation bar are all tinted gray, this shouldn't be happening because I didn

iOS - Switch between dismiss and scroll gestures

若如初见. 提交于 2019-12-03 14:33:24
There's a behavior in the Line messenger app (the de facto messenger app in Japan) that I'm trying to emulate. Basically, they have a modal view controller with a scroll view inside. When the scroll action reaches the top of its content, the view controller seamlessly switches to an interactive dismissal animation. Also, when the gesture returns the view to the top of the screen, control is returned to the scroll view. Here's a gif of how it looks. For the life of me, I can't figure out how they did it. I've tried a few different methods, but they've all failed, and I'm out of ideas. Can

Why does Apple recommends to create modal navigation controllers programmatically?

我怕爱的太早我们不能终老 提交于 2019-12-03 13:31:43
"When presenting a navigation controller modally, it is often simpler to create and configure your navigation controller object programmatically. Although you could also use Interface Builder to do so, doing so is generally not recommended." If fact, because my navigation controller is simple, I would rather customise the view in IB! While I don't know the exact reason, this is my shot at it: When creating the controller programmatically, you need only a few lines of code, in fact, in most cases this might be really few: creating, setting the root controller, presenting and releasing. The

Modal View Controller force Landscape orientation in iOS 6

断了今生、忘了曾经 提交于 2019-12-03 12:48:00
I have a UITabBarController presented in Portrait mode. On one of the tabs I have a button that shows a UIViewController modally (A simple storyboard segue performs the action). I want this modal view to be shown in Landscape mode, but I can't get it to turn automatically. I have this in the modal views controller - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft); } I've added landscapeLeft to the .plist supported orientations (although this also allows the TabBar to be rotated