surferbloggy 0 Newbie Poster

Hi, i want to change the colors of my app clicking a button
so when i click this button there's this code

    -(void)changestyle{
    change=true;
    [self init];
    }

it refresh the first controller and change the toolbar background color and the bg color of the buttons
but i know it's incorrect,
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;
    }

the third background color to change is the navigation bar that is set on appdelegate with this color (similar to the other background elements to change

     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]];
    }

i know i have to study a lot to understand the basics of objective C
could you help me to understand the correct coding for solving this issue ?? thank you for help

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.