ios - How to choose all but one UILabel included in self.view? -
when refresh user data webapp, want refresh labels present user data. unfortunately there 1 label not need updated. it's property uilabel *noappointments.
here's attempt, results in self.noappointments having label of error:
for(uilabel *subview in self.view.subviews){ if([subview iskindofclass:[uilabel class]] && (subview != self.noappointments)){ subview.backgroundcolor = [uicolor clearcolor]; subview.text = [[userobject userunique] getstringlabel:subview.tag]; [subview setfont:[uifont fontwithname:system_font_type size:system_font_size*1]]; [subview settextcolor:[uicolor lbluecolor]]; } } i have tried version of testing inequality of views:
if([subview iskindofclass:[uilabel class]] && !(subview == self.noappointments)) this gives error. error comes executing function
subview.text = [[userobject userunique] getstringlabel:subview.tag];
on self.noappointments.
i tried condition
if([subview iskindofclass:[uilabel class]] && !([subview isequal:self.noappointments])) this failed exclude self.noappointments. give dummy tag , function return right value unwanted uilabel, don't idea of modifying function in class solve problem. how can reject class/properly reject equality?
Comments
Post a Comment