uinavigationbar

How to add Bar Button in navigation bar without navigation controller.

假如想象 提交于 2019-12-03 20:09:44
问题 I am new to iOS development.I have create a navigation bar in my iPad application view.I don't need navigation controller that's why i have added only navigation bar. Now i want to add button in that navigation bar.I tried a lot but no success. Is it possible to add only navigation bar with button ? If yes then suggest me some sample code. "i don't have navigation controller or need it. i just want to add navigation bar in only one view." Bellow is my code which i write for adding navigation

Need wantsFullScreenLayout behavior with NON-translucent bars on iOS 7

女生的网名这么多〃 提交于 2019-12-03 17:41:54
问题 I want to be able to have my view cover the whole screen (go behind the navigation and tool bars) with the translucent property of the navigationBar and toolbar set to NO (I want non-transparent bars). This was easy to accomplish prior to iOS 7 by setting wantsFullScreenLayout to YES. However, in iOS 7, I can't find any way of doing this. Any ideas? 回答1: wantsFullScreenLayout is deprecated at iOS 7. Try setting your view controller's edgesForExtendedLayout property to UIRectEdgeAll The iOS 7

How to implement menu in iOS like Android

孤街醉人 提交于 2019-12-03 17:33:49
I need to implement menu for iOS like android.menu means button on navigation bar(right side) . If I click that menu will display. I am using a storyboard. So you want something like this: Even works in landscape: I think it's going to take forever for me to explain :D Basically I created a custom UINavigationController as mentioned in the comments above, called it ActionBarNavigationController From this custom UINavigationController, I added a custom UIView to display the ActionBar with the drop down button on the right. The drop down menu is a UITableView with a populated list of your choice

UIScrollView shifts below navigation and status bar

核能气质少年 提交于 2019-12-03 17:28:21
I have view which contains a scrollView. When the view shows up the image appears in full screen (320x480) hiding the status and navigation bar. When I tap the screens - status and navigation bar appears on the screen. But this thing shifts the UIScrollView below the the navigation bar. I want the status and nav bar to show over my scroll view. Like it happens in the photos app. On tapping the image the status and nav bar shows over the scrollView. Below is how I am positioning the view //What I have done in viewDidLoad [[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO];

How to change the uinavigationbar title's position?

假如想象 提交于 2019-12-03 16:56:26
I've managed to change the navigationbar height by using my own navigationbar, but the title is still centered. I want it to be at the 72px position from the left. override func sizeThatFits(size: CGSize) -> CGSize { return CGSizeMake(UIScreen.mainScreen().bounds.width, 56) } I used this to change the height but I didn't find a way to change the position of all the items. I tried to set the frame but I can't. I can't change the position of the button too. i wanna look like this Create a UIView object add UIButton and UILabel in it to show a similar view. Add this custom view into left bar

How to correctly set UINavigationBar height in iOS 11

核能气质少年 提交于 2019-12-03 16:29:34
In my iOS 9+ app I use UINavigationBar in some of the UIViewController s "manually" (= placing them directly in the VC instead of using UINavigationViewController ). Setting a height for such a UINavigationBar using a simple contraint was no problem before. However in iOS 11 the bar itself still correctly uses the assigned size, but the content is not positioned correctly any more (is now alligned to the top). Any idea how to solve this? EDIT: I am pretty sure, that this is not a duplicate of " customizing iOS 11 navigation bar height customizing ", this this question addresses a problem with

How to prevent gap between uinavigationbar and view in iOS 13?

女生的网名这么多〃 提交于 2019-12-03 16:15:53
问题 We are currently having an issue with navigation bar sizing when using modal presentation in iOS 13. In most cases this works fine as can be seen in this screenshot: However, in a few screens we get this weird effect, with the navigation bar having a lower height and a weird "see-through" gap between it and the view. As seen in this screenshot: Both of the view controllers have the same values set for their properties, are modally presented and have the same constrains on their subviews (0

ios Title and Subtitle in Navigation Bar centered

穿精又带淫゛_ 提交于 2019-12-03 16:05:17
I'm trying to have two UILabels in my navigation bar instead of just one. I followed this link to have informations on how to do that: iPhone Title and Subtitle in Navigation Bar It works well, but I can't get my texts to be centered properly. It is centered between the buttons, but the default title behaviour is to center itself right under the time. I had a look here, same question, but no answer: UINavigationBar TitleView with subtitle What am I missing? Here is my code: CGRect headerTitleSubtitleFrame = CGRectMake(0, 0, 200, 44); UIView* _headerTitleSubtitleView = [[UILabel alloc]

NavigationBar setShadowImage not always working

别说谁变了你拦得住时间么 提交于 2019-12-03 15:41:47
I'm trying to set a custom shadow image for the navigation bar in my table views, but it's only showing in some views. I've created a super class to set the styles for my table views. - (void)viewDidLoad { [super viewDidLoad]; // Set navigation bar background [self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"navigationbarbackground.png"] forBarMetrics:UIBarMetricsDefault]; // Set navigation bar shadow imag [self.navigationController.navigationBar setShadowImage:[UIImage imageNamed:@"navigationbarshadow.png"]]; In the view I see at starting my app, no shadow is

Prefer Large Titles and RefreshControl not working well

送分小仙女□ 提交于 2019-12-03 15:39:18
问题 I am using this tutorial to implement a pull-to-refresh behavior with the RefreshControl . I am using a Navigation Bar . When using normal titles everything works good. But, when using "Prefer big titles" it doesn't work correctly as you can see in the following videos. Anyone knows why? The only change between videos is the storyboard check on "Prefer Large Titles". 回答1: I'm having the same problem, and none of the other answers worked for me. I realised that changing the table view top