Open smazokha opened 9 years ago
@stepanmazokha, Hi Stepan, thank you for the feedback! I really appreciate that. please, ask more questions if you have some.
Or like this
NSAttributedString *attributedString = [[NSAttributedString alloc] initWithString:NSLocalizedString(@"someString", @"") attributes:@{......some attributes}]; [downloadButton.startDownloadButton seAttributedtTitle:attributedString forState:UIControlStateNormal];
Also you can copy attributes for the strings from PKDownloadButton.m file. There are functions: static NSDictionary DefaultTitleAttributes(); static NSDictionary HighlitedTitleAttributes();
So I extracted some todos for me from your feedback:
Hello! how to add Downloadbutton to cell in table. I can't call delegate! Help me. Thank you
Just added DownloadButton to my project. Have to say, it is great. Thank you, Pavel, for this awesome soluton! But still there are some things, I'd like to ask:
UIImage+PKDownloadButton
in Swift? When I try customising the button as in the example (calling UIImage initialiser with methodbuttonBackgroundWithColor
), that initialiser in unaccessible. (I add DownloadButton as accessoryView to myUITableViewCell
incellForRowAtIndex
method)UITableViewController
class, when I implementPKDownloadButtonDelegate
,downloadButtonTapped
method is never called when I tap the button. (I have a button in each row of my tableView). How should I properly implement it?Sorry for the very long text, but I think this would be useful for many beginnes, like me
Thank you in advance.