English 中文(简体)
我怎么能为UIButton创造一个充满活力的超支?
原标题:How can I create a dynamic overlay for a UIButton?

My application has a few portions that have really big buttons (640x130, 230x150, etc.) What I need is to have a way to update different portions of the button, with different text. Initially, I assumed that in my code I could create various UILabels and then add them as subviews to my button. However, as soon as I try to add a UILabel to the button as a sub-view, my app crashes.

在不防止纽顿的主人对使用超额控制感兴趣的情况下,我可以完全自行布署,这是为纽托邦造成超支的最容易的方法吗?

我认为,解决这一问题有多种途径。 然而,我案件的最佳解决办法是使用最短的法典(我有少数这样的州),我愿意继续使用国际B内部某种形式的可图纽。

I m not opposed to subclassing UIButton but, if I do, I would like to be able to use it in IB. I ve never created a custom UIView for such a circumstance, so I d need help defining that type of subclass so that it will work correctly in IB.

最佳回答

你们需要把次意见添加到包含观点上,而不是按纽伦。 确保这样做不会干扰顿报章,确保:

[myCustomTextOverlay setUserInteractionEnabled:NO];
问题回答

暂无回答




相关问题
List Contents of Directory in a UITableView

I am trying to list the contents of Ringtones directory in a TableView, however, I am only getting the last file in the directory in ALL cells, instead of file per cell. This is my code: - (...

iPhone NSUserDefaults persistance difficulty

In my app i have a bunch of data i store in the NSUserdefaults. This information consists of an NSObject (Object1) with NSStrings and NSNumbers and also 2 instances of yet another object (Object2). ...

Writing a masked image to disk as a PNG file

Basically I m downloading images off of a webserver and then caching them to the disk, but before I do so I want to mask them. I m using the masking code everyone seems to point at which can be found ...

Resize UIImage with aspect ratio?

I m using this code to resize an image on the iPhone: CGRect screenRect = CGRectMake(0, 0, 320.0, 480.0); UIGraphicsBeginImageContext(screenRect.size); [value drawInRect:screenRect blendMode:...

Allowing interaction with a UIView under another UIView

Is there a simple way of allowing interaction with a button in a UIView that lies under another UIView - where there are no actual objects from the top UIView on top of the button? For instance, ...

热门标签