Good morning, good evening !
I feel like my question is a dumb easy to solve question, but it looks like Google can't help me.
I want to add on my UINavigationBar a search button, but I want it borderless !
When I set it through Xcode I have this awful kind of button :
And I want this kind of button (from the Dropbox app) :
That would be nice if someone is able to explain me the trick to achieve this !
Thank you.
I think you have a bar button item. I have played around with it. And the Bar Buttom Item has to have a Tint of Clear Color. The actual Button a Type of Custom. Then it comes out more the way you want it (I think).
In my IB it looks like this:
It is the following
With properties like this:
And like this:
Hope it helps.
If you use Interface Builder set the button type to custom and use your image as background for the button.
Related
I am trying to make a title screen for my game and I cannot figure out how to change the text of a button using the Inspector.
Any ways I could do this?
Oops. I just realized the text is a child of the button. Never mind, don't answer!
Aight mate!
It is a common mistake... it is fine.
I'd advise you to use TextMesh Pro.
It is a better way and a way more customizable option.
It has crispier text and looks cleaner.
If you need any help, you can ask me out.
I want to change background colors of UIActionSheet buttons.How can I do that ?
There is no way to change UIActionSheet button colors, apart from adding a destructive button that creates a red option. If you really want custom button colors, try making a custom UIActionSheet like so: custom-uiactionsheet-using-core-animation
I had the same issue and only clicked together a basic solution.
The core animation approach is superior but that may be simpler
https://github.com/Daij-Djan/DDUtils/tree/master/ui/M42ActionSheet%20%5Bios%5D
Disclaimer: mine ;) and also not the coolest code since its from 2010 but it should work fine
I am trying to create a custom UITabBar. I have the regular UITabBarController working fine, but optimally, I wish to get it looking like this:
What is the best way to approach this? I can't seem to find any useful examples in Monotouch.
Thanks
The way I figured to make a tab bar like that, is just a bunch of custom buttons that are arranged and programmed to look like a tab bar, but really they are just buttons. I was able to recreate the instagram tab bar in one of my apps and it looks fairly similar. That's the only way I could figure how to do this type of tab bar when I was teaching myself.
Hope that helps.
There are some really good explanations around for how to do custom tab bars - especially on http://idevrecipes.com/2010/12/16/raised-center-tab-bar-button/ - source on https://github.com/boctor/idev-recipes/tree/master/RaisedCenterTabBar
I believe I have seen a github monotouch sample of this same code but I can't find it right now!
Can anybody please tell me how they have implemented the below thing whick looks to me like a TabBar but has something different from a simple tabbar.
The thing having "Offer" and "Wall", when each one is clicked, presents a different view.
Any sample code will be appreciated
Its a custom UIButton.
EDIT: What UI element might this be? (Custom tab-bar?). I had asked the same question a few weeks ago. There are two good answers there.
And google up for custom UIButton. You can find a few samples on your search
Its a custom view. You can always implement this kind of thing by using images. Say you have 2 different images. In one image offer is selected, and in another wall is selected. And you are using an image view to show them. An invisible button is placed in proper place. After tapping the button you can set the right image. And also if the images are not overlapping then you can use custom button.
in my app i use a navigation controller and a tabBar for my views. The problem is that the titles that i have for the views are a little too long to fit.. they appear like in the photo below.
alt text http://img17.imageshack.us/img17/1524/picture2usx.png
could someone give any suggestions for resolving this problem? i tried subclassing UITabBarItem but i can't add a label as a subview, i can't change the font or size.. it looks ok when i have only 4 buttons but that is not ok because i need that more button. cutting down the names is not an option either, i don't think apple would like that.
thank you in advance.
As far as I can tell, there is no way to do what you want to do easily.
You could build some of the name string into your icon image. This will of course force you to internationalize your icon images, and you will also end up with the blue coloring in some of your text.
You could have no titles at all, and overlay your font-scaled title by drawing on the containing view. Note that when there is no title in the tab bar item, the following page will also have no title in the title bar.
Better by far, if you can do it, is to shorten the names. I know this is tough in German, but surely there must be alternatives.
I hope that Apple improves this in 4.0, but as those fonts are already fairly small, I sort of doubt it.