/ / Self.hidesBottomBarWhenPushed = YES;
UIImagePickerController * picker = [[UIImagePickerControlleralloc] init];
if ([UIImagePickerControllerisSourceTypeAvailable: UIImagePickerControllerSourceTypeCamera])
{
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
NSArray * temp_MediaTypes = [UIImagePickerController availableMediaTypesForSourceType: picker.sourceType];
picker.mediaTypes = temp_MediaTypes;
picker.delegate = self;
picker.allowsImageEditing = NO;
}
[Picker viewWillAppear: NO];
[Picker viewDidAppear: NO];
[Picker viewDidAppear: YES];
[Picker viewWillAppear: YES];
[SelfpresentModalViewController: picker animated: YES];
picker.hidesBottomBarWhenPushed = YES;
[Picker release];
Some say plus
[Picker viewWillAppear: NO];
[Picker viewDidAppear: NO];
[Picker viewDidAppear: YES];
[Picker viewWillAppear: YES];
Can be achieved, but I tried too. Please help, grateful na!
In cocoa someone say:
If this view controller in a navigation controller, in the front view controller is pushed, it hidesBottomBarWhenPushed set to YES, the push tabBar disappears after return tabBar will appear again.
If not, want perfect control tabBar disappearance / appearance is quite troublesome thing to give you a scenario:.
Effect: tabBar slide down to disappear; tabBar slide up to the normal position
Principle: When tabBar always displayed at the bottom tabBarController.view therefore, modify tabBarController.view.frame, so tabBarController.view.frame.size.height larger than the screen size, tabBar screen will slide show tabBar, will tabBarController . view.frame modified to screen size, tabBar will be displayed in the normal position.
Note: The screen size is different in different directions when rotating the screen layout if you need to re-adjust the view controller contains scrollView, switching disappear / may appear when the show somehow beating
..
The first approach I have tried unsuccessfully tried how, I do not know how the second approach calls tabBarController. I added appdelegate.h header files viewcontroller inside, then so call:
/ / WASDemoAppDelegate * appdelegate = [[WASDemoAppDelegate alloc] init];
/ / [Appdelegate.tabController.view.frame: CGRectMake (0, 0, 320, 1000)];
But in [appdelegate.tabController.view.frame: CGRectMake (0, 0, 320, 1000)]; sentence in error, I do not know why. .
CSDN hereby to Almighty for help. . Brother novice, pray enlighten me. .
Reply:
so you can not hide the whole ah Listen to me, you have a button in the upper right corner viewcontroller, click the button to call a new viewcontroller, then set self.hidesBottomBarWhenPushed = YES in this viewcontroller;
Then displays a default UIImagePickerController
Reply:
Before hidesBottomBarWhenPushed in viewcontroller push the navigation controller settings
Reply:
The first, in the method call button wrote:
SecondViewController * sViewController = [[SecondViewController alloc] initWithNibName: nil bundle: nil];
[SViewController setHidesBottomBarWhenPushed: YES];
[Self.navigationController pushViewController: sViewController animated: YES];
[SViewController release];
Note: There will be diverted to the view controller instead of using the SecondViewController
Second, the phrase WASDemoAppDelegate * appdelegate = [[WASDemoAppDelegate alloc] init]; into the following one:
WASDemoAppDelegate * appDelegate = (WASDemoAppDelegate *) [[UIApplication sharedApplication] delegate];
The landlord can try
Reply:
Thanks for the answer to a few big brother! CSDN users is passion!
After I find something, and found a way to achieve a tabbar hidden. The layers to get up to UITabbar this control.
NSArray * windows = [[UIApplication sharedApplication] windows];
[[[[[[Windows objectAtIndex: 0] subviews] objectAtIndex: 2] subviews] objectAtIndex: 1] setHidden: YES];
But this is not completely hidden, only shows a white bar. . . Depressed ah. . . .
Brother upstairs for setHidesBottomBarWhenPushed usage I have tried, but will not ah. . tabbar did little reaction. .
The second way I can change the size of the frame, so I wrote:
WASDemoAppDelegate * appDelegate = (WASDemoAppDelegate *) [[UIApplication sharedApplication] delegate];
previosFrame = appDelegate.tabController.view.frame;
CGRect tmp = CGRectMake (CGRectGetMinX (previosFrame), CGRectGetMinY (previosFrame), CGRectGetWidth (previosFrame), CGRectGetHeight (previosFrame) +60);
appDelegate.tabController.view.frame = tmp;
Which previosFrame is a global variable that holds the original frame size and position. This can hide tabbar, but the camera and strange, a little drag to the above, but below the toolbar and imaging regions separated. . .
When the call is completed to return the camera so I wrote
WASDemoAppDelegate * appDelegate = (WASDemoAppDelegate *) [[UIApplication sharedApplication] delegate];
appDelegate.tabController.view.frame = previosFrame;
More strange situation, and all hell broke loose several tab. . . The high point, the low point. .
My God. .
Almighty ah! ! ! Save me ah. . . .
Reply:
The problem was finally resolved. . .
tabController.view size, then use the bounds,
Then the same operation on navigationcontroller and viewcontroller operations, but with the frame.
Alas, the novice is like this. . Toss unlimited. .
Thank you for your help. . Welcome to continue to give good advice.
Reply:
TabBar and ToolBar mix my side did not face this problem ⋯ ⋯
Or look at their own logic of it, setHidesBottomBarWhenPushed can certainly remember Init best placed to hide inside pages.
This is because the stack structure caused NavigationController, specifically did not say ⋯ ⋯ see Apple's own library illustrate.
Reply:
Yeah, I try to go. .
Reply:
tab bar controller - "presentModalViewController
Reply:
No comments:
Post a Comment