UITabBar item is not staying selected after i select it?

82 views Asked by At

i am very new to iOS. I created view controllers and i am using only UI Tab Bar, after i set delegate to files owner on nib file then when i click in one from items at tab bar that item is not staying selected (with blue colour), all of them are staying in grey, can someone tell me what to do?

In the other case when i don't set delegate to file's owner, if i select item it will be blue so it will work, but the view which i want to be in that item will not show.

1

There are 1 answers

0
Vikash Rajput On

Try this

 [[UITabBar appearance] setSelectionIndicatorImage:[AppDelegate imageFromColor:[UIColor colorWithRed:159/255.0 green:0/255.0 blue:167/255.0 alpha:1] forSize:CGSizeMake(64, 49) withCornerRadius:0]];`enter code here`**