【问题标题】:Changing the fontsize of the words in the shkactionsheet更改 shkactionsheet 中单词的字体大小
【发布时间】:2012-11-10 15:24:33
【问题描述】:

我想更改 shkactionsheet 中显示的单词的字体大小。我不确定如何更改字体大小。

这个词看起来像:

+ (SHKActionSheet *)actionSheetForType:(SHKShareType)type
{
    SHKActionSheet *as = [[SHKCONFIG(SHKActionSheetSubclass) alloc] initWithTitle:SHKLocalizedString(@"Share ")
                                                      delegate:nil
                                             cancelButtonTitle:nil
                                        destructiveButtonTitle:nil
                                             otherButtonTitles:nil];
    as.delegate = as;
    as.item = [[[SHKItem alloc] init] autorelease];
    as.item.shareType = type;

    as.sharers = [NSMutableArray arrayWithCapacity:0];
    NSArray *favoriteSharers = [SHK favoriteSharersForType:type];

    // Add buttons for each favorite sharer
    id class;
    for(NSString *sharerId in favoriteSharers)
    {
        class = NSClassFromString(sharerId);
        if ([class canShare])
        {
            [as addButtonWithTitle: [class sharerTitle] ];
            [as.sharers addObject:sharerId];
        }
    }

    if([SHKCONFIG(showActionSheetMoreButton) boolValue])
    {
        // Add More button
        [as addButtonWithTitle:SHKLocalizedString(@"More...")];
    }

    // Add Cancel button
    [as addButtonWithTitle:SHKLocalizedString(@"Cancel")];
    as.cancelButtonIndex = as.numberOfButtons -1;

    return [as autorelease];
}

【问题讨论】:

  • 好像不能更改分享文字的字体大小。从刚才开始我就一直在尝试..你可以改变大小吗?

标签: objective-c ios xcode facebook sharekit


【解决方案1】:

SHKActionSheet 是 UIActionSheet 的子类。所以检查 UIActionSheet 的文档。如果我没记错的话,是不可能改变字体的。但是,您可以创建自己的 UIView 并通过自定义来模仿 UIActionSheet 界面。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-10-22
    • 2017-11-30
    • 1970-01-01
    • 1970-01-01
    • 2014-07-13
    • 1970-01-01
    • 1970-01-01
    • 2020-10-29
    相关资源
    最近更新 更多