开发者

crash when loading the View

开发者 https://www.devze.com 2023-02-26 06:28 出处:网络
I have a button named settings, when I开发者_JAVA技巧 press this button the application crashes.

I have a button named settings, when I开发者_JAVA技巧 press this button the application crashes.

I have doubt in warnings that's why I'm going to show you what I got when building:

 .../RechercherViewController.m:66: warning: 'UISlider' may not respond to '-setShowValue:'

that warning is pointing me at this line in the viewDidLoad method:

[rayonDeRechercheSlider setShowValue:YES];

rayonDeRechercheSlider is a UISlider declared in the .h file of the View :

IBOutlet UISlider *rayonDeRechercheSlider;


UISlider does not use a boolean property called showValue and also UISlider does not offer any explicit method called setShowValue:, hence the method call: setShowValue:YES on a UISlider will crash the app.

You may want to call [rayonDeRechercheSlider setValue:1.0 animated:YES] (replace 1.0 with the value you intend to set.


After a little further research of where you might have gotten the idea of setShowValue: being a valid selector. I ran across this custom class called UISliderControl

Maybe this is what you are looking for?

EDIT:

More Info

0

精彩评论

暂无评论...
验证码 换一张
取 消