Hi i need help to solve this issue:
refresh the first controller, UITableview and navigation bar for changing bg colors
the color are set and it works i need only to refresh the app for update the app with the new colors
i change the colors of my app clicking a button
so when i click this button there's this code
-(void)changestyle
{
change=true;
[self initWithNibName:nil bundle:nil];
}
and all the bg color are set this way (this is navigation bar set in app delegate) (the array are ok i need only a way to refresh the first uitableview and navigation bar
if (change==true) {
NSInteger RGB1 = [[[qRGB1 getNavigationBarBG2]objectAtIndex: 0] integerValue];
NSInteger RGB2 = [[[qRGB1 getNavigationBarBG2]objectAtIndex: 1] integerValue];
NSInteger RGB3 = [[[qRGB1 getNavigationBarBG2]objectAtIndex: 2] integerValue];
NSLog(@"RGB1: %ld",(long)RGB1);
NSLog(@"RGB2: %ld",(long)RGB2);
NSLog(@"RGB3: %ld",(long)RGB3);
[[UINavigationBar appearance] setBarTintColor:[UIColor colorWithRed:RGB1/255.0 green:RGB2/255.0 blue:RGB3/255.0 alpha:1.0]];
}else{
NSInteger RGB1 = [[[qRGB1 getNavigationBarBG]objectAtIndex: 0] integerValue];
NSInteger RGB2 = [[[qRGB1 getNavigationBarBG]objectAtIndex: 1] integerValue];
NSInteger RGB3 = [[[qRGB1 getNavigationBarBG]objectAtIndex: 2] integerValue];
NSLog(@"RGB1: %ld",(long)RGB1);
NSLog(@"RGB2: %ld",(long)RGB2);
NSLog(@"RGB3: %ld",(long)RGB3);
[[UINavigationBar appearance] setBarTintColor:[UIColor colorWithRed:RGB1/255.0 green:RGB2/255.0 blue:RGB3/255.0 alpha:1.0]];
}
which is the correct way to refresh the first controller with this code???its name is in ZRK_ListViewController
-(id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
I need also to refresh the UItableview is in ZRK_PaginationView
from the method -(void)changestyle in ZRK_ListViewController
for changing the cell background color
i don't know how to write [tableView reloadData];
becouse it tells unknown receaver tableview and this is the interface of ZRK_PaginationView
interface ZRK_PaginationView : UIView<UITableViewDataSource,UITableViewDelegate>
{
UITableView *_tableView;
}
which is the correct way to refresh first controller, UITableview and navigation bar set in the appdelegate??
could you help me?? thank you