小编Dar*_*rko的帖子

从facebook中的iOS应用程序邀请Facebook用户:邀请未被发送

我试图邀请Facebook用户尝试我的iOS应用程序(尚未在商店中,尚未完成).

我使用facebook API来验证用户,然后尝试使用以下代码:

- (void)shareWithFriends:(id)sender
{
    UIAlertView *alert = [[UIAlertView alloc]
                          initWithTitle:@"Invite Friends"
                          message:@"If you enjoy using this app, would you mind taking a moment to invite a few friends that you think will also like it?"
                          delegate:self
                          cancelButtonTitle:@"No Thanks"
                          otherButtonTitles:@"Tell Friends!", nil];
    [alert show];
}

- (void)alertView:(UIAlertView *)alertView
didDismissWithButtonIndex:(NSInteger)buttonIndex {
    if (buttonIndex == 0) {
        // User has clicked on the No Thanks button, do not ask again
        NSLog(@"Chitty user says he doesn't wanna share");
    } else if (buttonIndex …
Run Code Online (Sandbox Code Playgroud)

xcode facebook ios

8
推荐指数
1
解决办法
4609
查看次数

自定义UIButton圆角在突出显示方面变得平方?

我有一个自定义UIButton的以下代码:

btnLogin.layer.cornerRadius = 10;

[btnLogin setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"bluetint.png"]]];
[btnLogin setAlpha:1];
[btnLogin setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[btnLogin setBackgroundImage:[UIImage imageNamed:@"reallybluetint.png"] forState:UIControlStateHighlighted];
[btnLogin setBackgroundImage:[UIImage imageNamed:@"reallybluetint.png"] forState:UIControlStateSelected];
Run Code Online (Sandbox Code Playgroud)

当我突出显示按钮时,即使它在正常状态下有圆角,它也会变成平方.

有任何想法吗?

xcode button ios

4
推荐指数
1
解决办法
1364
查看次数

标签 统计

ios ×2

xcode ×2

button ×1

facebook ×1