Wednesday, 11 September 2013

Property 'tag' not found on object of type 'const _strong id'

Property 'tag' not found on object of type 'const _strong id'

I put tag on StoryBoard attribute inspector for my UILabel and I have this
code on my ViewController.m :
for (id subview in [[self view] subviews]) {
if (subview.tag==1) {
[subview setFont:[UIFont
fontWithName:@"Raleway-ExtraLight" size:12]];
} else if (subview.tag==2){
[subview setFont:[UIFont
fontWithName:@"Raleway-ExtraLight" size:28]];
}
}
when I run my code I got this error :
Property 'tag' not found on object of type 'const _strong id'
what did I missed here? thank you...

No comments:

Post a Comment