0
我想继承自定义UIButton
:继承自定义的UIButton
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
我该怎么办呢?我该怎么办:
[self performSelectorOnMainThread:@selector(setBackgroundImage:forState:) withObject:image waitUntilDone:YES];
这是可能的吗?
试图子类或使用“UIButtonTypeCustom”? –
你不应该继承'UIButton'。请参阅http://stackoverflow.com/questions/5045672/create-uibutton-subclass。 – smparkes
嗯..试图创建一个类,lazily加载backgroundImage,那么我该怎么做呢? – adit