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