I have a cell with two shortcuts. How can I programmatically center the alignment of the top mark and hide the second mark?
UITextAlignmentCenteroutdated. You should use the following:
UITextAlignmentCenter
labelOne.textAlignment = NSTextAlignmentCenter;
[labelOne setTextAlignment: UITextAlignmentCenter]; // for the center of the text in UILabel [labelTwo setHidden: YES] // there, but not visible.
, : - ..
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath { firstLabel.frame = cell.frame; // or reconfigure your frame or some reason(i dont know) firstLabel.textAlignment = NSTextAlignmentCenter; secondLabel.hidden = YES; }
, ?
Source: https://habr.com/ru/post/1749960/More articles:My Twitter PHP script stops working! - apihttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1749956/easy-ways-to-investigate-unknown-python-apis&usg=ALkJrhi5qmDqMAB8_s1mXhbo1SEDa11GGwhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1749957/how-can-i-restrict-access-to-all-files-in-a-folder-without-webconfig&usg=ALkJrhirn-jNF8KOqwU0JqvhpB1xIUImogWindows Authentication - MVC 2 ASP.Net - authenticationHow to check if a .NET DLL is registered? - c ++How to create an abbreviation from a string in MATLAB? - stringHow do you get a flat list of all files in IsolStorage? - c #MacBook for django development? - djangoAndroid - save file when application closes - javaTomcat/Spring - ΠΠ΅ΡΠ΅Π·Π°ΠΏΡΡΡΠΈΡΡ Webapp - javaAll Articles