0

我正在尝试有一个具有登录按钮的模式弹出视图。但是当我点击登录按钮时。单击登录按钮时,我将无法识别的选择器发送到类 0x1a846c。

loginView.opaque = NO;
loginView.autoresizingMask =
UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
[aSuperview addSubview:loginView];

//login button
const CGFloat DEFAULT_BUTTON_WIDTH = 280.0;
const CGFloat DEFAULT_BUTTON_HEIGHT = 50.0;
const float fbYoffset=150.0;
CGRect fbButtonFrame = CGRectMake(0, fbYoffset, DEFAULT_BUTTON_WIDTH, DEFAULT_BUTTON_HEIGHT);
UIButton *fbLoginButton = [UIButton buttonWithType:UIButtonTypeCustom];

[fbLoginButton setFrame:fbButtonFrame];

[fbLoginButton setTitle:NSLocalizedString(@"Login",nil) forState:UIControlStateNormal];
fbLoginButton.autoresizingMask =
UIViewAutoresizingFlexibleLeftMargin |
UIViewAutoresizingFlexibleRightMargin |
UIViewAutoresizingFlexibleTopMargin |
UIViewAutoresizingFlexibleBottomMargin;

[fbLoginButton addTarget:self action:@selector(login) forControlEvents:UIControlEventTouchUpInside];

[loginView addSubview:fbLoginButton];



-(void)login
{
    NSLog(@"Pressed login..");
}
4

0 回答 0