ios Switch Slider Progress Alert ActionSheet

1.UISwitch設置打開時按鈕顏色ide

    [switch1 setOnTintColor:[UIColor purpleColor]];

2.UISwitch判斷是否打開代理

    if (mySwitch.on) {
        NSLog(@"打開了");
    }else{
        NSLog(@"關了");
    }

2.設置關閉時按鈕顏色code

    [switch1 setTintColor:[UIColor orangeColor]];

3.UISlider設置最大值、最小值、當前值事件

    [mySlider setMaximumValue:100];
    [mySlider setMinimumValue:20];
    [mySlider setValue:20];

4.UIProgressView設置值it

[myProgressView setProgress:0.5];

5.UIAlertView的建立和顯示io

    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Alert"
 message:@"message" delegate:self cancelButtonTitle:@"Cancel"
 otherButtonTitles:@"OK",  @"hehe", @"df", nil];
    [alert show];

6.UIAlertView按鈕點擊代理事件(buttonIndex從0開始)class

-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{}

7.UIActionSheet的建立和顯示cli

    UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"Title" 
delegate:self cancelButtonTitle:@"cancel" destructiveButtonTitle:@"ok" otherButtonTitles:@"1", @"2", nil];
    [actionSheet showInView:self.view];

8.UIActionSheet按鈕點擊代理事件(buttonIndex從0開始)im

-(void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex{}
相關文章
相關標籤/搜索