uinavigationbar

How can I put a search bar in (not under) a unnavigationbar?

故事扮演 提交于 2019-12-12 01:26:37
问题 I'd like to put a search bar in my navigation bar, like safari has. If I add a UISearchBar to my view, it ends up underneath the navigation bar instead. How can I put a search bar in (not under) a unnavigationbar? 回答1: I do it this way: UISearchBar * navSearchBar = [[UISearchBar alloc] initWithFrame:CGRectMake(0, 0, 232, 44)]; navSearchBar.delegate = self; self.navigationItem.titleView = navSearchBar; [navSearchBar release]; I hope it helps! 回答2: Try putting UISearchBar or UITextField in

UINavigationBar gets cropped in landscape

老子叫甜甜 提交于 2019-12-12 01:24:46
问题 I am facing this situation where the navigation bar looks OK in portrait mode but gets cropped in landscape: portrait landscape I subclassed UINavigationBar as follows: class CustomNavigationBar: UINavigationBar { override func sizeThatFits(size: CGSize) -> CGSize { let newSize :CGSize = CGSize(width: self.frame.size.width, height: 64) return newSize } } and assigned it to the appropriate Navigation Controller via the StoryBoard: but it makes no difference. Any ideas? 回答1: Navigation bar has

How do I resize height of UINavigationBar while allowing to set root view controller?

强颜欢笑 提交于 2019-12-12 01:21:44
问题 I want to resize height of UINavigationBar I came across few questions previously asked here, but I believe this is quite different then those. Found that, I've to make subclass of UINavigationBar and where I should update height of it. But then to use that subclassed navigation bar I've to use below method of UINavigationController . Here it is: - (id) initWithNavigationBarClass:(nullable Class)navigationBarClass toolbarClass:(nullable Class)toolbarClass; if I used this to set my subclassed

android: what's this slider bar called and how to implement it?

断了今生、忘了曾经 提交于 2019-12-12 00:42:36
问题 This may be a dumb question but could anyone please tell me what this slider (highlighted in yellow) called in Android? Is it a navigation bar? I want to implement the same slider in my app, could anyone please let me know if there's any sample I can refer to? Thanks. 回答1: As for the part you highlighted, it doesn't have any particular name, it's just some view with selector background. As for the mechanism itself (pulling view to reveal another), it is SlidingDrawer. Note that it has been

Hiding Navigation bar with self.navigationController.hidesBarsOnSwipe = true, hides it permanently

ぃ、小莉子 提交于 2019-12-11 23:47:25
问题 I have a UITableView object in my view controller and I added the following code inside viewDidAppear: : self.navigationController.hidesBarsOnSwipe = true The navigation bar is hiding when I scroll up, but when I scroll down it's not coming back. Do I need to do something else? 回答1: By default storyboard add tableview top constraint to "Top Layout Guide.Bottom", you need to change the tableview.top constraint to "View.Top" 回答2: check your constraints for tableview . It's top constraint should

Back button title missing with long screen title in iOS 7

不羁的心 提交于 2019-12-11 23:34:21
问题 I am seeing that "Back" button title is missing when my screen title is big. I needed to show the entire title. Is there any workaround to this? Please see attached the screenshot of navigation bar I see with long title. 回答1: Make your screen title smaller. You can take control of it by using a titleView that's a UILabel. The advantage is that you can set its size, and that it can truncate its text and/or make the text occupy two lines if the text is too big (rather than just growing, as the

Tableview scroll to top not going all the way

久未见 提交于 2019-12-11 23:18:55
问题 I have a navigation bar that I've manually coded to animate the frame of depending on the offset of the scrollView ( tableView ). Below is a screenshot of what it looks like unscrolled. Now after setScrollOffset:(0,0) is invoked (by scrollsToTop , not me manually - e.g. by tapping status bar), the scrollview scrolls to the top, but at the position at which there used to be no navigation bar. I can manually scroll the last 44px or so after the animation happens, but obviously thats not the

Remove right navigation item, while previewing the document

♀尐吖头ヾ 提交于 2019-12-11 20:14:33
问题 I am doing following code in didSelectRowAtIndexPath, document is opening but right navigation item is not removed. - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { if (url) { self.pdf_viewer = [UIDocumentInteractionController interactionControllerWithURL:url]; [self.pdf_viewer setDelegate:self]; [self.pdf_viewer presentPreviewAnimated:YES]; } } and - (UIViewController *)documentInteractionControllerViewControllerForPreview:

Wrong order in navigation bar and table view

风流意气都作罢 提交于 2019-12-11 20:01:00
问题 from a Home VC, embedded in a storyboard: I tap on the left button, performing a segue. This segue will lead me to a navigation controller with its own tableview (the one that comes with the object). I simply want a black navigation bar, but it seems that navigation bar is before the view and the view, i before the tableView. in storyboard I set: the navigation bar to "opaque black navigation bar" in table view's attributes inspector I set view's background to red (is a test) check the last

How to go back multiple pages in ionic 3

ぃ、小莉子 提交于 2019-12-11 19:53:17
问题 I have the page flow like below: A->B->C->D Somehow I will do a function in page"D", after it need to go back page"B". How can I achieve that? Using .pop() just can go back one page. Using .push(B) is also not the solution, because the flow will become: A->B->C->D->B The solution I want is: A->B Anyone know how to achieve it? Thanks a lot. 回答1: this.navCtrl.popTo(this.navCtrl.getByIndex(this.navCtrl.length()-(N+1))); Where N is the number of pages that you want to go back. So if you want to