Xcode 4.6 if statement with && -
my problem is
-(ibaction)setaction:(id)sender{ if ([labelone.text isequal: @"one"] && [labeltwo.text isequal: @"two"]) { labelshow.text = @"yes works :)"; } }
and if build it. show me error code: thread 1: signal sigbart
but works if this
-(ibaction)setaction:(id)sender{ if ([labelone.text isequal: @"one"]) { labelshow.text = @"yes works :)"; } }
what can do, first 1 works?:)
the sibabrt implies either labeltwo or labeltwo.text pointing bad memory.
first figure out pointer bad, , debug see why. also, provide crash log when possible. there should error message associated in debug output pane.
check out this debugging tutorial.
Comments
Post a Comment