I want to jump to third tab in tabcontroller. I searched in Google but found nothing helpful.
If anybody can help I will be grateful.
Was the title/question changed? I thought the question was about Xcode...
For what you're asking, try setting selectedIndex of your UITabBarController, like this:
self.tabBarController.selectedIndex = indexOfTab;
However don't overuse it, some automatic transitions between tabs can be considered as bad user experience.
Don't just stop with this shortcut - learn more! Here's an extensive list of Xcode 4 shortcuts: print the B&W version, pin it your wall, learn and enjoy the Xcode even more.
You want to set the selectedIndex property of the tab controller
http://developer.apple.com/library/ios/documentation/uikit/reference/UITabBarController_Class/Reference/Reference.html
Related
I'm currently working with an example from Raywenderlich: UISearchController-Tutorial (The finished project is at the end of their article or here) and I noticed that when I execute a search and click on one of the results, during the push transition, the UISearchController disappears. It's visible on this video: here
Before selecting a result
During the transition to the new VC
I run this example with Xcode 10, iOS 12 (sim: iPhone 8)
Any idea / pointer would be deeply appreciated
Cheers.
Its default in iOS12. Just look at the Apple-Mail App. There it is the same. Actually you dont need the searchbar, when you are showing another VC
I currently have multiple views open as children to my navigation controller through the method navigation controller.push(). When you rotate the device it automatically goes back all the way to the root view controller, as if you called poptorootview().
I am wondering why it is doing this and how to stop this from happening. I have not modified UINavigationController class in any way.
Thank you!
In case anyone else is looking for any workaround .I had this really annoying issue in iOS 11.1 only but everything was looking good in iOS 10 and below.
Finally I got it fixed by updating my Xcode to 9.2 and the problem has been disappeard, still I have no idea what caused that, but it take 3 days to me to get rid of it!
I just started my first project in iOS, recently I have encountered a problem in the UI when i receive it from the designer.
The expected output is shown as below and i can do most of it without any problem.
Now the problem came when I am about to implement this :
As the number of colour varies depending on item, I cannot add it like what I did for the share and love button I have no idea how can i implement something like this, I have look through the Object Library in the storyboard and cannot find any that can produce the output as expected .Any helps and guides are much apprecited!
I need to show error message as a tooltip in iOS 8 but i don't know how to do it. What I want is something similar to the one shown in below image (I'm referring to the tooltip with messages Select and Select All):
There is a great collection of libraries which already target your problem.
For example have a look at: AMPopTip.
Then you could show the popover like:
self.popTip = [AMPopTip popTip];
[self.popTip showText:errorMessage direction:AMPopTipDirectionUp maxWidth:200 inView:self.view fromFrame:textField.frame];
and hide it:
[self.popTip hide];
Have a look at the github repo there are more examples for customizing this control.
You can find more which might suit your needs better here: cocoacontrols.com
I had a similar problem and wrote my own custom tooltip.
You can init with your custom view (i assume you write some delegations to detect actions within.) and present from anywhere.
Maybe not the best replacement of UIPopoverController but still works great. And a lifesaver for iPhone. Also highly customisable.
https://github.com/akeara/AKETooltip
Hope this helps.
I used the setHidesBottomBarWhenPushed to hide tabBar when A viewController pushed to B viewController,but in the process ,the navigationBar displayed black background color and then became normal quickly.
I have spent a day to trying to solve this problem,but all ways not working.
Appreciating your help.
Thank you.
I just created a very simple "Tabbed Application" project like this.
Pust to viewController when clicked push barButtonItem,and the "Hide Bottom Bar On Push " property of viewController was checked in storyboard.
The result was :
I met the same problem while using old MacBook (about 2011 early) before. I think it is the render issue of the simulator while using some out-of-dated devices. But actually, when you run your code on real device (iPhone 5 above), this issue is unusual.