
#import "FavouriteViewController.h"

@implementation FavouriteViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    //self.view.backgroundColor = UIColor.yellowColor;
    
//    NSString *color = @"systemPinkColor";
//    self.view.backgroundColor = [UIColor performSelector:NSSelectorFromString(color)];
    
    self.view.backgroundColor = [UIColor colorWithRed:233/255.0 green: 203/255.0 blue: 251/255.0 alpha: 1.00];
    
    [self.view addGestureRecognizer: [[UITapGestureRecognizer alloc] initWithTarget: self action: @selector(testMethod)]];
}


-(void)testMethod{
    
    UIAlertController * view=   [UIAlertController
                                 alertControllerWithTitle:@"Staus ! "
                                 message:@"Select your current status"
                                 preferredStyle:UIAlertControllerStyleActionSheet];


    UIAlertAction* online = [UIAlertAction
                         actionWithTitle:@"Online"
                         style:UIAlertActionStyleDefault
                         handler:^(UIAlertAction * action)
                         {
                             //Do some thing here
                             [view dismissViewControllerAnimated:YES completion:nil];

                         }];
    UIAlertAction* offline = [UIAlertAction
                             actionWithTitle:@"Offline"
                             style:UIAlertActionStyleDefault
                             handler:^(UIAlertAction * action)
                             {
                                 //[view dismissViewControllerAnimated:YES completion:nil];

                             }];
    UIAlertAction* doNotDistrbe = [UIAlertAction
                             actionWithTitle:@"Do not disturb"
                             style:UIAlertActionStyleDefault
                             handler:^(UIAlertAction * action)
                             {
                                 [view dismissViewControllerAnimated:YES completion:nil];

                             }];
    UIAlertAction* away = [UIAlertAction
                                   actionWithTitle:@"Do not disturb"
                                   style:UIAlertActionStyleDestructive
                                   handler:^(UIAlertAction * action)
                                   {
                                       [view dismissViewControllerAnimated:YES completion:nil];

                                   }];

    [online setValue:[[UIImage systemImageNamed:@"gear"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate] forKey:@"image"];
    [offline setValue:[[UIImage imageNamed:@"offline.png"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] forKey:@"image"];
    [doNotDistrbe setValue:[[UIImage imageNamed:@"DND.png"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] forKey:@"image"];
    [away setValue:[[UIImage imageNamed:@"away.png"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] forKey:@"image"];


    //[online setValue:[NSNumber numberWithInt:NSTextAlignmentLeft]
    //forKey:@"titleTextAlignment"];



    [view addAction:online];
    [view addAction:away];
    [view addAction:offline];
    [view addAction:doNotDistrbe];
    [self presentViewController:view animated:YES completion:nil];
    
}

@end
