|
|
|
@ -89,10 +89,11 @@ NSString *const kProfileView_LastPresentedDate = @"kProfileView_LastPresentedDat
|
|
|
|
|
|
|
|
|
|
- (void)createViews
|
|
|
|
|
{
|
|
|
|
|
self.view.backgroundColor = [UIColor colorWithRGBHex:0xefeff4];
|
|
|
|
|
self.view.backgroundColor
|
|
|
|
|
= (Theme.isDarkThemeEnabled ? [UIColor colorWithRGBHex:0x202020] : [UIColor colorWithRGBHex:0xefeff4]);
|
|
|
|
|
|
|
|
|
|
UIView *contentView = [UIView containerView];
|
|
|
|
|
contentView.backgroundColor = [UIColor whiteColor];
|
|
|
|
|
contentView.backgroundColor = Theme.backgroundColor;
|
|
|
|
|
[self.view addSubview:contentView];
|
|
|
|
|
[contentView autoPinToTopLayoutGuideOfViewController:self withInset:0];
|
|
|
|
|
[contentView autoPinWidthToSuperview];
|
|
|
|
@ -111,7 +112,7 @@ NSString *const kProfileView_LastPresentedDate = @"kProfileView_LastPresentedDat
|
|
|
|
|
UILabel *nameLabel = [UILabel new];
|
|
|
|
|
nameLabel.text = NSLocalizedString(
|
|
|
|
|
@"PROFILE_VIEW_PROFILE_NAME_FIELD", @"Label for the profile name field of the profile view.");
|
|
|
|
|
nameLabel.textColor = [UIColor blackColor];
|
|
|
|
|
nameLabel.textColor = Theme.primaryColor;
|
|
|
|
|
nameLabel.font = [UIFont ows_mediumFontWithSize:fontSizePoints];
|
|
|
|
|
[nameRow addSubview:nameLabel];
|
|
|
|
|
[nameLabel autoPinLeadingToSuperviewMargin];
|
|
|
|
@ -149,7 +150,7 @@ NSString *const kProfileView_LastPresentedDate = @"kProfileView_LastPresentedDat
|
|
|
|
|
UILabel *avatarLabel = [UILabel new];
|
|
|
|
|
avatarLabel.text = NSLocalizedString(
|
|
|
|
|
@"PROFILE_VIEW_PROFILE_AVATAR_FIELD", @"Label for the profile avatar field of the profile view.");
|
|
|
|
|
avatarLabel.textColor = [UIColor blackColor];
|
|
|
|
|
avatarLabel.textColor = Theme.primaryColor;
|
|
|
|
|
avatarLabel.font = [UIFont ows_mediumFontWithSize:fontSizePoints];
|
|
|
|
|
[avatarRow addSubview:avatarLabel];
|
|
|
|
|
[avatarLabel autoPinLeadingToSuperviewMargin];
|
|
|
|
@ -183,7 +184,7 @@ NSString *const kProfileView_LastPresentedDate = @"kProfileView_LastPresentedDat
|
|
|
|
|
[rows addObject:infoRow];
|
|
|
|
|
|
|
|
|
|
UILabel *infoLabel = [UILabel new];
|
|
|
|
|
infoLabel.textColor = [UIColor ows_darkGrayColor];
|
|
|
|
|
infoLabel.textColor = Theme.secondaryColor;
|
|
|
|
|
infoLabel.font = [UIFont ows_regularFontWithSize:11.f];
|
|
|
|
|
infoLabel.textAlignment = NSTextAlignmentCenter;
|
|
|
|
|
NSMutableAttributedString *text = [NSMutableAttributedString new];
|
|
|
|
@ -249,8 +250,7 @@ NSString *const kProfileView_LastPresentedDate = @"kProfileView_LastPresentedDat
|
|
|
|
|
|
|
|
|
|
if (lastRow == nameRow || lastRow == avatarRow) {
|
|
|
|
|
UIView *separator = [UIView containerView];
|
|
|
|
|
separator.backgroundColor = [UIColor colorWithWhite:0.9f alpha:1.f];
|
|
|
|
|
[contentView addSubview:separator];
|
|
|
|
|
separator.backgroundColor = Theme.secondaryColor [contentView addSubview:separator];
|
|
|
|
|
[separator autoPinEdge:ALEdgeTop toEdge:ALEdgeBottom ofView:lastRow withOffset:5.f];
|
|
|
|
|
[separator autoPinLeadingToSuperviewMarginWithInset:18.f];
|
|
|
|
|
[separator autoPinTrailingToSuperviewMarginWithInset:18.f];
|
|
|
|
@ -356,7 +356,7 @@ NSString *const kProfileView_LastPresentedDate = @"kProfileView_LastPresentedDat
|
|
|
|
|
} else {
|
|
|
|
|
self.saveButton.enabled = NO;
|
|
|
|
|
[self.saveButton
|
|
|
|
|
setBackgroundColorsWithUpColor:[[UIColor ows_signalBrandBlueColor] blendWithColor:[UIColor whiteColor]
|
|
|
|
|
setBackgroundColorsWithUpColor:[[UIColor ows_signalBrandBlueColor] blendWithColor:Theme.backgroundColor
|
|
|
|
|
alpha:0.5f]];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|