0

我想更改 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];
}
4

1 回答 1

0

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

于 2012-11-23T20:56:12.650 回答