UITabBar functionality in an object - ios

Is there an object I can use that "simulates" the TabBar functionality and doesn't need to be in the middle of the screen?
Meaning - an object I can have tabs, put images on them, automatic nice "selection color" and of course run some code on selection
IOS 7 and up is OK

If I understood your question, you're looking for a UISegmentedControl.

Related

Place image on top of all "layers" on iOS screen

What are the constraints/alternatives to place an image that stays on top of all iOS "layers" and windows. Think of it as a lock screen but that still allows you to interact with you phone, meaning browse, answer calls, etc. The image will be displayed in a transparent way (say 40%) and will be launched by an application.
Not really sure what you are asking for but if you are looking for a way to add some code once and it shows everywhere on each of your ViewController then there really is no way to do that.
What you can do is
Use UIToolBar
add buttons to that tool bar
Add that tool bar to each ViewController in storyboard (where you need them)
Create a global function / method that you can call in from any ViewController that has the button actions in it. That way you edit the code once in one place and use it every where.
If you don't like UIToolBar then
you can add your own UIImageView and add a transparent background to it
Add your buttons on the UIImageView. (You will have to add constraints)
then show that on every ViewController
If all this seems to much work then you can use existing controls HERE and see which one fits your needs.
This maybe a good one - FCVerticalMenu

Make custom selected tab bar Item in iOS Swift

I am working on an application using Swift which needs to have a TabBarController and when user will select a tab then that particular tab bar item shows a 3d visual effect (Although it will be an static image I guess) which contains shadow and that tab bar item will be bigger in size as well with different tint colour.
Please see the attached image.
I have searched a lot on internet but no luck. Please someone help :(
Use http://cocoapods.org/pods/M13InfiniteTabBar
For as much as I do not like answers in the tone It can't be done, I feel that the specific of your screenshot, namely going outside of the UITabbar background, can't be done with UITabBarController.
You can use -initWithTitle:image:selectedImage:. Documentation found here

How to get square hovering over button iOS

Sorry, the question isn't really clear, but basically I want a button or a label or something like that that says "notifications" and a small red square (like Facebook) that displays the number of notifications that user has (if they have any). How would I go about doing that? I'm not too advanced with UI design in iOS yet. I'm coming from an Android background so feel free to use any comparisons if there are any.
What you are referring to is called a badge. Some native controls have them (tab bar buttons come to mind), but most do not.
If you are using a tab bar controller, you can set the badge value from the UIViewController. Something like this:
[[self tabBarItem] setBadgeValue:#"1"];
If you are looking to implement a custom one, it could be easily accomplished with a UIView and a UILabel. Add a badge view to what ever view based control you are creating, then add a label to that badge view and set its text. There are probably lots of third party ones floating around the web already though.

What is the correct approach for a custom UIToolBar?

Is it better - better in the sense of not getting rejected from the Apple store - when trying to create a custom* UIToolbar to either:
Option A
Add the oversize middle button as a UIButton to the self.navigationController.view this is key as I'm adding a UIButton to the navigationController which seems to contradict the apple docs
Use UIToolbar appearance to implement the custom background
Option B
Create a UIToolbar and add it as a subview of the current ViewController in UINavigationController
Add the UIButton as a subview of the current ViewController in UINavigationController
Use UIToolBar's method setBackgroundImage to add the custom background
*Custom background, Oversized middle button
This is the shape of the toolbar:
Extra details: This app is for iOS 5.X or greater. It uses UINavigationController. Key challenge is that a section of the app hide/shows the navigationbar depending on the state of the app.
Option A means I don't have to workout where to place the UIToolBar, it's a challenge to work out where to place the UIToolbar because a) if I'm showing or hiding the navigationBar this shifts everything up/down vertically b) iPhone 5 with extra vertical space - I can't use autolayout as I'm support iOS 5 and I haven't really worked out how to use autoresizing masks. I'mu using hard coded "magic" numbers.
I wouldn't do either of those.
UIToolbar is nice when you want to do what it does, and it does allow some basic customization. But in this case you want a toolbar-like view that draws itself in a way that UIToolbar doesn't seem to allow for. You probably know exactly what items you want to appear in your "toolbar", and it's unlikely that you'll need to handle arbitrary assortments of UIBarItems.
So, instead of giving yourself a headache trying to force UIToolbar to do something that it was never designed for, just create a simple view containing your background image (part of which will be transparent). Place some image-based UIButtons in the view, and call it a day. It wouldn't be a bad idea to create a custom UIView subclass representing your toolbar so that all the setup is nicely packaged up in one place, and so that you can reuse the toolbar in multiple views if you need to.

Unusually cool looking tab bar setup within a rootviewcontroller of a UISplitView

The ABC (Australian Broadcasting Corporation) iView app for iPad, has great looking tab like setup within a rootViewController of a UISplitView.
The tabs named "Browse/Watch/Listen" are particularly interesting are they simulated or real tabs?
It's unlike any UITabBar I've seen around in iPad apps.
Does anyone know how something like that is possible?
The round rect button in custom mode will be transparent and any png image will maintain in transparencies.
3 or more buttons with transparent images would be the way to go. A different color for when they are selected and your all set. You could also make them look like they are overlapping with images that continue the button next to it.
With the iOS devices it is more about appearance and less about the underlying functionality.
This is a custom control, they made themselves from scratch.
Fortunately for you, you don't need to make it from scratch. :)
There's a lot of open source component that does just this, just like these ones.
Those tabs look and feel like 3 UIButtons. Notice how the UI highlight acts when touching the buttons, and the action is only triggered on touchUpInside.
The tab content is probably a UITableView which gets refreshed when switching tabs.

Resources