How do I set the background image of a UISegmentedControl - iphone

I have a view with a segmentedcontrol in it and I would like to set the background image of that control. I know that I can change set the tint color, but I want more control over it than that. So if I could set a background image that would be cool.
I found this tutorial on how to achieve this, however it's outdated, and I'm unable to get it working.
Could anyone please help me? I greatly appreciate any help.
UPDATE
Half the solution has been found, if the only thing one needs to support is iOS5 you can use setBackgroundImage:forState:barMetrics:. A great tutorial on the matter can be found here.

How about this?: setBackgroundImage:forState:barMetrics:
Straight from the docs
Note: Available in iOS 5.0 and later.

Related

Some Border Types in NSImageView Not Appearing

I've looked in previous posts in SO and elsewhere for an answer but no luck. I'm putting images in an NSCollectionView as well as just a single image itself but the only border that seems to work is the grey Bezel border. Other types that are available don't show up, like Button or Groove. This is true no matter what scaling option I use, or even if I use it in code. I'm using NSImageView.imageFrameStyle.
I hope someone has some insight into this. I didn't provide any code since I didn't think that's necessary. Using Xcode 10.1, Swift 4.2. Thanks for any help.

How do I change the tint color (background) of a UIActionSheet in iOS5?

I would like to change the tint color of my UIActionSheet for my iOS apps. Is there an easy answer or custom class which I can use to achieve this?
I have found help on changing the colors of the Action Sheet buttons which is helpful, but I haven't found anything about changing the background color.
There is no API, but you could subclass UIActionSheet and play around with its subviews array till you find the one that draws the background and either edit it directly, or add a subview to cover it up.
While this isn't the greatest approach, it isn't using any hidden APIs to it won't get rejected from the iTunes store. Before iOS 5, this is how most customization was done.
Here is a great example of doing it with Navbars.
I am not able to respond to the above comments. However the link provided by #Luke is broken, but I have found it to be active here: https://github.com/gpambrozio/BlockAlertsAnd-ActionSheets
There is no legal API for this, and if you use illegal API your app will be rejected from the app store. The simplest solution is to roll your own interface and not use UIActionSheet.

Where can I find some beautiful iPhone buttons?

Don't need image background, just good-looking color is enough.
Jeff LaMarche has some very iOS-looking and simple-to-use programmatic gradient buttons here.
You just need to add a .h and .m file to your project and you are good to go.
http://www.youthedesigner.com/2010/03/10/29-sexy-iphone-app-designs/
http://www.smashingmagazine.com/2009/10/09/iphone-app-design-trends/
These may not be of any use but check them out. There are some really well designed apps and u'll get a good idea of what colours work. Your question is slightly vague to provide an exact answer IMO.
You can get the RBB values of the colours using a number of tools.
Check this
Fun With UIButtons and Core Animation Layers

How to grab badge icon image out of iphone simulator?

I found the response to a post about MKPinAnnotationView icons very helpful. See: MKPinAnnotationView: Are there more than three colors available?.
I want to do the same thing getting the icon badge out of the simulator so that I can use it elsewhere as a static image. I'm guessing I would get the UITabBarItem view and drill down the subviews until I find it, and then do the same thing as in the post above to get the icon out. Is that correct?
I'm hoping to get direct input from "yonel" as well to say THANK YOU (can't post a comment on that thread) for the images from the map. I'd been looking for those for many days.
Any input here is greatly appreciated.
You will probably easily find it by installing and running UIKit Artwork Extractor
Use this excellent PSD and get anything you need.

how to set image as background programmatically,iphone

HI all,
how to set an image as a wallpaper, programmatically, in iphone?
Suggestions are always appreciated.
regards
If you're talking about changing the phone's wallpaper, that's not possible programmatically.
i think i got the answer here
http://tiptopobjectivec.blogspot.com/2010/06/change-wallpaper-programatically.html
setting wallpaper progrmmatically, is undocumented API. so cant use.