ios - No visible @interface for 'UIButton' declares the selector 'setBackgroundImage:forState:' -


this error happened in afnetworking/uikit+afnetworking/uibutton+afnetworking.m.and when go uibutton.h,find there no method setbackgroundimage should there.

i find error happened whenever u use setbackgroundimage. seems not relevant library

uibutton *btn = [[uibutton alloc]initwithframe:cgrectmake(self.frame.size.width, 0, 10, 10)]; [btn setbackgroundimage:[uiimage imagenamed:@"something.png"] forstate:uicontrolstatenormal]; code here! can me?thanks

there no method signature *

setbackgroundimage:forstate:'

* use - (void)setbackgroundimageforstate:(uicontrolstate)state withurl:(nsurl *)url; or - (void)setbackgroundimageforstate:(uicontrolstate)state withurl:(nsurl *)url placeholderimage:(nullable uiimage *)placeholderimage;


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -