I’m working on an iPad app right now that takes as input an XML file and outputs a Cocoa-like user interface that’s dynamically generated based on the content of the XML file. Part of the specification that I’ve been given dictates that one of the UI elements is a simple frame that looks exactly like a Cocoa Touch button, but does not act as a button; IE, it does nothing when clicked on, and does not visually change in any way. I wanted to use the iOS equivalent of a NSBox mocked up to look like a NSButton, but upon inspection it seems that there is no UIBox class that is equivalent to a NSBox the same way that UIButton is similar/equivalent to the NSButton. Can anyone more experienced in iOS than I suggest a design pattern for creating a button’s ‘frame’ without the additional weight of a new button?
Share
Simple, just disable user interaction on the button. This way it will still look like a button but it won’t act like one.
Alternatively you could create a
UIImageViewand use Quartz to adjust the corner radius of the image.