Changing UIView attributes via Interface Builder - ios

In Xcode 5 Can we change UIView attributes like background color through Interface builder. I am trying to change the background color on UIButton which inherits from UIView on interface builder but it looks like you could do that in Xcode 4.x on a custom button but in Xcode 5 that I have I do not see any options to change any attributes for the UIButton's UIView properties.

Go to the view section on the right and then click on "Show". The section will scroll up.

Related

Button to imitate UIBarButtonItem

I am using the UIBarButtonItems to trigger special actions but I also want to add another button on the bottom part of the screen with the same dimensions as the ones created in the NavigationBar, how could I do this?
Can I do it in the Interface Builder with some fixed width/height constrains or do I have to do it programatically, if so could you give me an example?
Thank you
The easiest way would be to add a UIToolbar to the bottom of the view. If your view controller is in a UINavigationController, the best way to do this would be to add the bar button items, either in Interface Builder by drag-and-drop or programmatically using setToolbarItems.

iOS : subclassing UINavigationBar for custom title view

I've subclassed UINavigationBar, I wanted to have a UIView contains UIImageView + UILabel inside it, I'm able to achieve it by setting titleView property. But, what I want to know is whether its possible to add it inside subclass directly?
Better way add one UIView on Navigationbar and then add any component on that so it is easy to manage those component because if you add component on left button right button and title label it not that much flexible to customise (i.e. if you added any component on titleLabel you can set that component frame only equal or less that title label. but if you add on UIView on Navigation bar then you can customise all components easily)
I hope it will help you.

Button Attributes is not working in Iphone

I have a UIButton in a nib file(.xib) which uses the Attributed Title from IB, but does not reflected when runs on device.
My configuration for button is as follow:
but not reflected.
One reason could be you have again set the UIButton title by programmatically. If you set your button title from IB, and again set it from code. In runtime it take title from code.

Creating a custom UINavigationbar for iPad in iOS 5 with ARC

I am creating an iPad application for ios 5 using arc and storyboard in xcode 4.3. I need to customize the UInavigationbar to make it broader than its usual size (almost double sized) and add to it some custom logos (images) and buttons. Can anyone pls point me in the correct direction on how this can be acheived? any third party libraries are also welcome if required.
Thanks in advance for your help on this one.
To start, you'll want to subclass UINavigationBar. While it is possible to change the height, the UINavigationBar background isn't going to play nicely, so you'll probably want to use your own background image.
Here's some information about resizing the navigation bar
Change the height of NavigationBar and UIBarButtonItem elements inside it in Cocoa Touch
iPhone - How set uinavigationbar height?
And another article on how to add the images and buttons as subviews.
http://www.iosdevnotes.com/2011/09/custom-uinavigationbars-techniques/
I don′t know how you would change the size of the UINavigation bar.
To add custom buttons you can outlet your navigationItem in the storyboard to the interface of your view controller. Then use setLeftBarButtonItems: and setRightBarButtonItems: to put multiple buttons you previously created.
To add custom black and white logos to the buttons you can use [navigationButtonItem setBackgroundImage: yourImage].
If you want your logos in color you can create a UIButton with the colored logo ([newButton setImage: yourImage]) and then init your navigation button item with : initWithCustomView: newButton.

How to group toolbar items in iOS project?

in many iOS projects you can see toolbar items that are grouped like this
As you can see the arrows are grouped. Any idea how to achieve this by code?
Actually you can put anything (any View) in UIToolbar. Every UIBarButtonItem has a property "customView". Just set the customView any view you want. In this case it's a UISegmentedControl. You can also simply drag out an UISegmentedControl onto your UIToolbar in Interface Builder.

Resources