posted by dalnimbest 2013. 5. 11. 21:08


//버튼 동적으로 생성하기
    UIButton *btnCancel = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    btnCancel.frame = CGRectMake(110, 55, 90, 37);
    [btnCancel setTitle:[NSString stringWithFormat:@"%@",NSLocalizedString(@"Cancel", @"")]  forState:UIControlStateNormal];
    btnCancel.backgroundColor = [UIColor blueColor];           
    [btnCancel addTarget:self action:@selector(dismissBtnCancel) forControlEvents:UIControlEventTouchUpInside];
    [theView addSubview:btnCancel];