【iOS】UISwitch


  • 初始化

    UISwitch *switch= [ [ UISwitch alloc ] initWithFrame: CGRectMake(200, 10, 0, 0) ];
    switch.on = NO;
    switch.tag = 2;
    [switch addTarget:self action:@selector(switchAction:) forControlEvents:UIControlEventValueChanged];
    [self addSubview: jumpToNextAuto];

  • 縮小要用 transform
    switch.transform = CGAffineTransformMakeScale(0.75, 0.75);
 

Ed32. Copyright 2008 All Rights Reserved Revolution Two Church theme by Brian Gardner Converted into Blogger Template by Bloganol dot com