chore: 更新 .gitignore 文件并删除过时的文档
主要变更: 1. 在 .gitignore 中添加了 Docs/ 文件夹,以忽略文档相关文件。 2. 删除了多个过时的文档,包括构建指南、编译修复指南和当前状态报告等。 此更新旨在清理项目文件,确保版本控制的整洁性。
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#import "YuMi-Swift.h"
|
||||
#import "EPEmotionColorPicker.h"
|
||||
#import "EPEmotionColorStorage.h"
|
||||
#import "UIView+GradientLayer.h"
|
||||
|
||||
// 发布成功通知
|
||||
NSString *const EPMomentPublishSuccessNotification = @"EPMomentPublishSuccessNotification";
|
||||
@@ -39,6 +40,8 @@ NSString *const EPMomentPublishSuccessNotification = @"EPMomentPublishSuccessNot
|
||||
@property (nonatomic, strong) NSMutableArray *selectedAssets; // TZImagePicker 已选资源
|
||||
@property (nonatomic, copy) NSString *selectedEmotionColor; // 选中的情绪颜色
|
||||
|
||||
@property (nonatomic, assign) BOOL hasAddedGradient; // 标记是否已添加渐变背景
|
||||
|
||||
@end
|
||||
|
||||
@implementation EPMomentPublishViewController
|
||||
@@ -52,6 +55,22 @@ NSString *const EPMomentPublishSuccessNotification = @"EPMomentPublishSuccessNot
|
||||
[self loadUserSignatureColor];
|
||||
}
|
||||
|
||||
- (void)viewDidLayoutSubviews {
|
||||
[super viewDidLayoutSubviews];
|
||||
|
||||
// 添加渐变背景到发布按钮(只添加一次)
|
||||
if (!self.hasAddedGradient && self.publishButton.bounds.size.width > 0) {
|
||||
// 使用与登录页面相同的渐变颜色(EPLoginConfig.Colors)
|
||||
// gradientStart: #F854FC, gradientEnd: #500FFF
|
||||
[self.publishButton addGradientBackgroundWithColors:@[
|
||||
[UIColor colorWithRed:0xF8/255.0 green:0x54/255.0 blue:0xFC/255.0 alpha:1.0], // #F854FC
|
||||
[UIColor colorWithRed:0x50/255.0 green:0x0F/255.0 blue:0xFF/255.0 alpha:1.0] // #500FFF
|
||||
] startPoint:CGPointMake(0, 0.5) endPoint:CGPointMake(1, 0.5) cornerRadius:25];
|
||||
|
||||
self.hasAddedGradient = YES;
|
||||
}
|
||||
}
|
||||
|
||||
/// 加载用户专属颜色作为默认选中
|
||||
- (void)loadUserSignatureColor {
|
||||
NSString *signatureColor = [EPEmotionColorStorage userSignatureColor];
|
||||
@@ -177,7 +196,13 @@ NSString *const EPMomentPublishSuccessNotification = @"EPMomentPublishSuccessNot
|
||||
UIGraphicsEndImageContext();
|
||||
|
||||
[self.emotionButton setImage:colorDotImage forState:UIControlStateNormal];
|
||||
[self.emotionButton setTitle:@" Emotion Selected" forState:UIControlStateNormal];
|
||||
|
||||
// 获取情绪名称
|
||||
NSString *emotionName = [EPEmotionColorStorage emotionNameForColor:self.selectedEmotionColor];
|
||||
NSString *title = emotionName
|
||||
? [NSString stringWithFormat:@" Selected Emotion: %@", emotionName]
|
||||
: @" Emotion Selected";
|
||||
[self.emotionButton setTitle:title forState:UIControlStateNormal];
|
||||
} else {
|
||||
[self.emotionButton setImage:nil forState:UIControlStateNormal];
|
||||
[self.emotionButton setTitle:@"🎨 Add Emotion" forState:UIControlStateNormal];
|
||||
@@ -280,9 +305,11 @@ NSString *const EPMomentPublishSuccessNotification = @"EPMomentPublishSuccessNot
|
||||
for (UIView *sub in cell.contentView.subviews) { [sub removeFromSuperview]; }
|
||||
BOOL showAdd = (self.images.count < 9) && (indexPath.item == self.images.count);
|
||||
if (showAdd) {
|
||||
UIImageView *iv = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"mine_user_info_album_add"]];
|
||||
UIImageView *iv = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"icon_moment_addphoto"]];
|
||||
iv.contentMode = UIViewContentModeScaleAspectFill;
|
||||
iv.clipsToBounds = YES;
|
||||
[cell.contentView addSubview:iv];
|
||||
[iv mas_makeConstraints:^(MASConstraintMaker *make) { make.center.equalTo(cell.contentView); make.size.mas_equalTo(CGSizeMake(24, 24)); }];
|
||||
[iv mas_makeConstraints:^(MASConstraintMaker *make) { make.edges.equalTo(cell.contentView); }];
|
||||
} else {
|
||||
UIImageView *iv = [[UIImageView alloc] init];
|
||||
iv.contentMode = UIViewContentModeScaleAspectFill;
|
||||
@@ -348,15 +375,8 @@ NSString *const EPMomentPublishSuccessNotification = @"EPMomentPublishSuccessNot
|
||||
[_publishButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
||||
_publishButton.titleLabel.font = [UIFont systemFontOfSize:17 weight:UIFontWeightMedium];
|
||||
_publishButton.layer.cornerRadius = 25;
|
||||
_publishButton.layer.masksToBounds = YES;
|
||||
// 渐变背景:从浅紫到深紫
|
||||
CAGradientLayer *gradient = [CAGradientLayer layer];
|
||||
gradient.colors = @[(__bridge id)[UIColor colorWithRed:0.6 green:0.3 blue:0.8 alpha:1.0].CGColor,
|
||||
(__bridge id)[UIColor colorWithRed:0.3 green:0.1 blue:0.5 alpha:1.0].CGColor];
|
||||
gradient.startPoint = CGPointMake(0, 0);
|
||||
gradient.endPoint = CGPointMake(1, 0);
|
||||
gradient.frame = CGRectMake(0, 0, 1, 1);
|
||||
[_publishButton.layer insertSublayer:gradient atIndex:0];
|
||||
_publishButton.layer.masksToBounds = NO; // 改为 NO 以便渐变层正常显示
|
||||
// 渐变背景将在 viewDidLayoutSubviews 中添加(与登录页面统一)
|
||||
[_publishButton addTarget:self action:@selector(onPublish) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _publishButton;
|
||||
|
Reference in New Issue
Block a user