Swift Change look of Uitabcontroller? - swift

Recently tried to implement a toolbar in my app, for now I'm using the uitabcontroller which is built in.
I wondered if it was possible to edit something like so:
http://i64.tinypic.com/iwlxzo.jpg
I've failed to find any documentation on customising a uitabcontroller or creating one...
Thank you in advance!

You'll need to subclass UITabbarController to perform the changes that you require. I suggest you look up subclassing to get the right idea.

Related

How to generate .m/.h files from Storyboard?

Is there a convenient way to generate code from any new view controllers I've created on the storyboard? For example when you create a new iOS application, XCode will set up a skeleton class for your view controller.
Thanks!
I don't think so. You need to create a new ViewController subclass in XCode but uncheck the "Create Xib for this class" box (not sure if that is exactly what it says). Then select your newly made view controller in storyboard and change it to the class you just created.
Ok the skeleton you are talking about is just a template for your application. You are asking for a dynamic template generator from your storyboard and maybe Apple can figure out how to do this in a non distant future but in this moment I think you can't do that. After you created the storyboard file with your complex scheme you need to manually create all your viewController subclass you used in the storyboard. It's not a big deal ... I suppose your application doesn't have thousand ViewController so you can do it manually.
Apple are working hard to simplify developers job but Xcode can't do everything for you.
You can try to post this answer directly to Apple throughout the bugreport Apple website and post it as improvement to implement in future Xcode release.
Lets try it :)

UIPopOverController for iPhone (currently only available for iPad)

Before I implement something similar for the iPhone, I'm wondering if anyone has implemented something similar of the UIPopOverController for the iPhone. This is so far only available for iPad.
See my implementation here: https://github.com/werner77/WEPopover
It has the same interface as the UIPopoverController but is generalized for iPhone and with support for custom background views.
I have provided another alternative SGPopoverController at http://github.com/KJoyner/SeaGlass. Like the WEPopover, this has a similar interface to UIPovoerController but works on the iPhone. This version handles more corner cases, works both modally and non-modally, supports passthrough views, and more.
Create
UIPopover+iPhone.h
#import <Foundation/Foundation.h>
#interface UIPopoverController (overrides)
+ (BOOL)_popoversDisabled;
#end
There's a reason UIPopoverController isn't a standard UI element on the iPhone, is that screen space is rather restricted. Having a popover, that's easily readable, implies that a fair amount of the iPhone screen will be taken up by the popover. Perhaps you should rethink your UI decision.
Maybe a coverVertical modal view?
Found another git. Looks more updated and actively maintained. it uses QuantzCore to draw the popover, which looks as elegant as iOS's SDK native.
Just for your reference: https://github.com/50pixels/FPPopover
Basically the best way to do this is to implement custom UIAlertView subclasses that look/behave how you want, via custom animations and being able to click behind and disappear (if you want that functionality, as UIPopoverController has it)
Edit: you can also try using a view and presenting it modally, though the animations might not be what you are looking for.

How do I hide an infoButton in a utility app from the MainViewController when the infoButton is in the RootViewController?

How would I go about updating an object declared in the RootViewController from my MainViewController?
I'm attempting to hide my info button when my iAd is tapped, I have all the relevant pieces of code for the iAd in place, but can't figure out how to code the action. I saw an example of a similar situation online that was like this:
((MainViewController *)parentViewController).infoButton.hidden = #"";
I haven't been able to get that to work though, I just need this one value modifiable from the MVC, can anyone give me a simple suggestion?
P.S. I'm a total n00b and a snippet of code would help a great deal, I'm kind of learning as I go, thanks!
I figured this out through use of the NSNotificationCenter

How to creat UITable, UIButton, UILable, UIImage, UIText, UISlider, UINavigationBar, UITabBar programiticly?

I'm new with the iphone programming and I'm trying to know how to create all of these (UI's) without using the IB, so I'm only asking for the code lines that will create each one of these.
The best way to figure this out is to read through the documentation for each of these classes. Some which are subclasses of UIView can be instantiated with -initWithFrame:, for example.
i am new to iphone/ipad programming , i fallowed below links to create views programmatically... i think these are helpful to u also >>
To create UIButton,UILabel,UIImage,UITextField programmatically
http://www.edumobile.org/iphone/iphone-programming-tutorials/implement-uibutton-uitextfield-and-uilabel-programmatically-in-iphone/
To create UITableView Programatically
http://thesdkblog.com/2011/05/how-to-setup-a-uitableview-programmatically/
To create UINavigationController and UITabbarController Programmatically
http://codenugget.org/how-to-embed-a-navigation-controller-inside-a
http://www.xdracco.net/howto-implement-uinavigationcontroller-uitabbarcontroller-programmatically/
Thanks u..
I've Noticed that a lot of people viewed this question, so I was doing a search on this subject and I came through a great sample code, which can explain how to do a lot of things and here is the link to that sample code:
http://developer.apple.com/iphone/library/samplecode/uicatalog/Introduction/Intro.html
I hope that this will help.

Using TTMessageController by -pushViewController

TTMessageController (from the Three20 framework) was recommended to me to replicate the email creation behavior. However, I am running into a bit of a problem integrating it with my application. The rest of my application uses a UINavigationController in order to show the various UIViewControllers, but it doesn't seem that TTMessageController works when called by -pushViewController. When I attempt to use pushViewController for a TTMessageController, the size of the view becomes smaller and the buttons on the navigation bar stop working. If anyone could give me any advice regarding how to show the TTMessageController correctly using this method, please let me know.
Thanks for any help!
You should present it modally, using presentModalViewController:animated:.
You should use also the TTNavigator component from the Three20 library.
For instance, basic navigationController doesnt not dispatch appear/disappear events ... so I assume Three20 components work better together !