From a4ff1b48d060327dc36a67b1035b484cb2df36f9 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 4 Aug 2024 01:34:14 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=94=AF=E6=8C=81=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E5=8F=B3=E4=BE=A7=E6=98=BE=E7=A4=BA=E6=96=87=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .DS_Store | Bin 0 -> 6148 bytes Setting/.DS_Store | Bin 0 -> 6148 bytes Setting/Setting.xcodeproj/project.pbxproj | 8 ++++ .../xcshareddata/IDEWorkspaceChecks.plist | 8 ++++ .../AppIcon.appiconset/Contents.json | 45 ++++++++++++------ Setting/Setting/ZFettingViewController.m | 5 +- ZFSetting/.DS_Store | Bin 0 -> 6148 bytes ZFSetting/Model/.DS_Store | Bin 0 -> 6148 bytes ZFSetting/Model/ZFSettingItem.h | 6 ++- ZFSetting/Model/ZFSettingItem.m | 11 ++++- ZFSetting/View/.DS_Store | Bin 0 -> 6148 bytes ZFSetting/View/ZFSettingCell.m | 15 ++++-- 12 files changed, 76 insertions(+), 22 deletions(-) create mode 100644 .DS_Store create mode 100644 Setting/.DS_Store create mode 100644 Setting/Setting.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 ZFSetting/.DS_Store create mode 100644 ZFSetting/Model/.DS_Store create mode 100644 ZFSetting/View/.DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..1f67c23302ec475e24f6434c21ae7b71a3b0f64a GIT binary patch literal 6148 zcmeHK%}T>S5Z-O8O({YS3Oz1(Etpm-h?h|73mDOZN=-V;Vf`-UZsSq?*x@smEk*hgkma<8($fiM3 zG0|T%;kP%L$0C-)@6-3o06cHOG>Nm^ao%~Y-q_l1T1~5M-FXjk;pKil&xZc&21l1t zCPAtD!BreB#`f-+Omja@qnS#G!w5oduj4e7i=mvSVWx6D?XX%_YixIx%fsVdSM;61 zsw1pXhLFu z7$63Sfz4vToC8*Sv&yDwi2-8Z2Mpl;AfO?-1`Ca9>wpfg&**O;qJWNX2}EJgHCSi_ z4+z((fI5|%CkEH)U>7FNHCSlW>5QwDVIH$``FP=Kb+8K+&bX_QdSZYWSZAQFhc=%7 z=kS-QeB`gE(1;iy2L2fXyfN}dLnz9et>4PSvsOU6hlYZ21u7t*uU!IQfcr>CIkjJ) a4sou*LL<(Cc9jlD7Xd{Gb;Q6gFz^9A#7t}e literal 0 HcmV?d00001 diff --git a/Setting/.DS_Store b/Setting/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..a7f0e7179bd0a785938132bf5335339cc7b11bb8 GIT binary patch literal 6148 zcmeHKu};G<5PgOYkyzS|(O&@S#A>Rrvg8L)8&p7T6QNdOjKuHo9W4A5@9tdGhzu12 zLg+5C-}!v!*e{CD1`uYudJ2pI6fA;4lmQX*VAn}@9ub3%@rVtUxWEe*0|Wg9r6u`|@IgOy$Zh;ocpp{{36 zViW^0W$X-Tp#%#hT4=~uj9}rk$LyCfc7_&?pl{|l`OW*w%l^b0qPim_L$93yXQ0o( zsWr!v|8Mv!4PNs5A>MKZoPmGFKp2%(Ipd;oZvD1A$+eN?jzvWLI#DRpH5C&z6|*7x f$hme}e-xelDPw0SqljI@iGC1JLcDSYeu05cYgapA literal 0 HcmV?d00001 diff --git a/Setting/Setting.xcodeproj/project.pbxproj b/Setting/Setting.xcodeproj/project.pbxproj index 80cc775..21364d2 100644 --- a/Setting/Setting.xcodeproj/project.pbxproj +++ b/Setting/Setting.xcodeproj/project.pbxproj @@ -265,6 +265,7 @@ TargetAttributes = { CC9523ED1BADA07D0040FF08 = { CreatedOnToolsVersion = 7.0; + ProvisioningStyle = Manual; }; CC9524091BADA07D0040FF08 = { CreatedOnToolsVersion = 7.0; @@ -281,6 +282,7 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, Base, ); @@ -474,11 +476,14 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Manual; + DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = Setting/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 7.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = zifeng.Setting; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; }; name = Debug; }; @@ -486,11 +491,14 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Manual; + DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = Setting/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 7.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = zifeng.Setting; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; }; name = Release; }; diff --git a/Setting/Setting.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Setting/Setting.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Setting/Setting.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Setting/Setting/Assets.xcassets/AppIcon.appiconset/Contents.json b/Setting/Setting/Assets.xcassets/AppIcon.appiconset/Contents.json index 118c98f..8121323 100644 --- a/Setting/Setting/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/Setting/Setting/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -2,37 +2,52 @@ "images" : [ { "idiom" : "iphone", - "size" : "29x29", - "scale" : "2x" + "scale" : "2x", + "size" : "20x20" }, { "idiom" : "iphone", - "size" : "29x29", - "scale" : "3x" + "scale" : "3x", + "size" : "20x20" }, { "idiom" : "iphone", - "size" : "40x40", - "scale" : "2x" + "scale" : "2x", + "size" : "29x29" }, { "idiom" : "iphone", - "size" : "40x40", - "scale" : "3x" + "scale" : "3x", + "size" : "29x29" }, { "idiom" : "iphone", - "size" : "60x60", - "scale" : "2x" + "scale" : "2x", + "size" : "40x40" }, { "idiom" : "iphone", - "size" : "60x60", - "scale" : "3x" + "scale" : "3x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "60x60" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "60x60" + }, + { + "idiom" : "ios-marketing", + "scale" : "1x", + "size" : "1024x1024" } ], "info" : { - "version" : 1, - "author" : "xcode" + "author" : "xcode", + "version" : 1 } -} \ No newline at end of file +} diff --git a/Setting/Setting/ZFettingViewController.m b/Setting/Setting/ZFettingViewController.m index f15f9b3..b8d61b6 100755 --- a/Setting/Setting/ZFettingViewController.m +++ b/Setting/Setting/ZFettingViewController.m @@ -80,10 +80,13 @@ - (void)add1SectionItems { [weakSelf.navigationController pushViewController:helpVC animated:YES]; }; + // 开发者微信 + ZFSettingItem *weixin = [ZFSettingItem itemWithIcon:@"MoreShare" title:@"开发者微信" type:ZFSettingItemTypeText text:@"xxxxxx"]; + ZFSettingGroup *group = [[ZFSettingGroup alloc] init]; group.header = @"高级设置"; group.footer = @"这是footer"; - group.items = @[ help, share , about]; + group.items = @[ help, share , about,weixin]; [_allGroups addObject:group]; } diff --git a/ZFSetting/.DS_Store b/ZFSetting/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..95b9d6546752b9dabc486c908746508d5438e926 GIT binary patch literal 6148 zcmeHK%}&BV5T4~nN{9&uO*l63N+KW?NItbHz z2=iuPIuxPaj?cGMI0#20kIVowu*yJMPm6T_pMKu|uO{(~8DIwf6aymDcH1p1$=t1L x#nD}Bqu!#DP+X#Mk%ET0iZPb1;u5M7^xI@0ItCMs=t1Eh0Yw83%)qxY@D9VUOv3^_F$=N|z}1j1^Xx;}J7lx1wX=H!7fK zSKtO$7-P!Q`#8U6R9NE)eLRd7)!k%KO)M5NC-&dWY)jwqmks`FgMYjy|A=og#j>3p zFJzx@W&fJp$c+oK&$igMffz!8P#_feX9}=ptM!f?V+;jCfly$hfPNnmU9rqqJKCp% zgS7xe{f#u^Tzd)Sq>N?8+L3o?;#8tjCAS#jbgriyS7xjooes&(hvdwXI~1|(e15WU zNa+}3C=d$lDsbSJh1UPe&-?#fQe1@sp}?O~K)S>6aKJ6)+S=Nj*4jkBrK@RN?YNOO>2TW@K literal 0 HcmV?d00001 diff --git a/ZFSetting/Model/ZFSettingItem.h b/ZFSetting/Model/ZFSettingItem.h index 3ede342..8b60794 100755 --- a/ZFSetting/Model/ZFSettingItem.h +++ b/ZFSetting/Model/ZFSettingItem.h @@ -12,7 +12,8 @@ typedef NS_ENUM(NSInteger, ZFSettingItemType) { ZFSettingItemTypeNone, // 什么也没有 ZFSettingItemTypeArrow, // 箭头 - ZFSettingItemTypeSwitch // 开关 + ZFSettingItemTypeSwitch, // 开关 + ZFSettingItemTypeText //文本 }; @interface ZFSettingItem : NSObject @@ -20,6 +21,7 @@ typedef NS_ENUM(NSInteger, ZFSettingItemType) { @property (nonatomic, copy) NSString *icon; /// 标题 @property (nonatomic, copy) NSString *title; +@property (nonatomic, copy) NSString *text; /// 设置开关 @property (nonatomic, assign, getter=isSwitchOn) BOOL switchOn; /// cell的样式 @@ -31,4 +33,6 @@ typedef NS_ENUM(NSInteger, ZFSettingItemType) { + (instancetype)itemWithIcon:(NSString *)icon title:(NSString *)title type:(ZFSettingItemType)type; ++ (instancetype)itemWithIcon:(NSString *)icon title:(NSString *)title type:(ZFSettingItemType)type text:(NSString *)text; + @end diff --git a/ZFSetting/Model/ZFSettingItem.m b/ZFSetting/Model/ZFSettingItem.m index b5c01ee..81eb2bb 100755 --- a/ZFSetting/Model/ZFSettingItem.m +++ b/ZFSetting/Model/ZFSettingItem.m @@ -10,7 +10,7 @@ @implementation ZFSettingItem -+ (instancetype)itemWithIcon:(NSString *)icon title:(NSString *)title type:(ZFSettingItemType)type { ++ (instancetype)itemWithIcon:(NSString *)icon title:(NSString *)title type:(ZFSettingItemType)type{ ZFSettingItem *item = [[self alloc] init]; item.icon = icon; item.title = title; @@ -18,4 +18,13 @@ + (instancetype)itemWithIcon:(NSString *)icon title:(NSString *)title type:(ZFSe return item; } ++ (instancetype)itemWithIcon:(NSString *)icon title:(NSString *)title type:(ZFSettingItemType)type text:(NSString *)text{ + ZFSettingItem *item = [[self alloc] init]; + item.icon = icon; + item.title = title; + item.type = type; + item.text=text; + return item; +} + @end diff --git a/ZFSetting/View/.DS_Store b/ZFSetting/View/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..6e4d70cf7a63cb1cb0e4ff930d67e079df1f15f2 GIT binary patch literal 6148 zcmeHKyG}zf3_XSpl^E#Am@lZrAB55(F?VA^g$j^v=~DLmQ9lvRi38}CE3s7w*_C~q z#CCFz)I0##?CtRqm;e}4g(hb})IB(K(t?FnYwWPY3tsVr>w!Xlu}f<|#~p64#G0%B zUjG^$e^Wf)cH4(lw_Pz(G+j}r?^Wpimc2R1-XCPw5@CXYU?3O>27-YjGQcxiGCp$* z8w>;k!N3;-+8+{Cm>U+yx^>X#`mFJhP(ojqWMOKU8x}{7P|Q<_o@(uhVV=(Z)Z%i( z;^^tHIy39EnLi&dR%d5_s^PHg7&aIP2Ko$~dUK-lf5E@Z;3L1E60Kk$82D!l*l50- z&-hX8Z2j?hI%^a4o+?pXkwc;1y9BVIedMAJ`goGhxZJQfs*3t+Ix#K+m5?yOz!4bu E0EyEpv;Y7A literal 0 HcmV?d00001 diff --git a/ZFSetting/View/ZFSettingCell.m b/ZFSetting/View/ZFSettingCell.m index c09e068..52ace78 100755 --- a/ZFSetting/View/ZFSettingCell.m +++ b/ZFSetting/View/ZFSettingCell.m @@ -11,6 +11,7 @@ @interface ZFSettingCell() { UISwitch *_switch; + UILabel *_text; } @end @@ -42,7 +43,7 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reus - (void)setItem:(ZFSettingItem *)item { _item = item; // 设置数据 - self.imageView.image = item.icon.length ? [UIImage imageNamed:item.icon] : nil; + self.imageView.image = item.icon.length ? [UIImage imageNamed:item.icon] : nil; self.textLabel.text = item.title; if (item.type == ZFSettingItemTypeArrow) { self.accessoryType = UITableViewCellAccessoryDisclosureIndicator; @@ -53,13 +54,19 @@ - (void)setItem:(ZFSettingItem *)item { _switch = [[UISwitch alloc] init]; _switch.on = item.switchOn; [_switch addTarget:self action:@selector(switchStatusChanged:) forControlEvents:UIControlEventValueChanged]; - } else { - [_switch setOn:item.switchOn animated:YES]; - } + } else { + [_switch setOn:item.switchOn animated:YES]; + } // 右边显示开关 self.accessoryView = _switch; // 禁止选中 self.selectionStyle = UITableViewCellSelectionStyleNone; + }else if(item.type == ZFSettingItemTypeText){ + UILabel *rightLabel = [[UILabel alloc]initWithFrame:CGRectMake(0,0,item.text.length*10,self.frame.size.height)]; + rightLabel.text=item.text; + //rightLabel.textAlignment = NSTextAlignment; + self.accessoryView= rightLabel; + //self.accessoryView.backgroundColor= [UIColor lightGrayColor];   //加上红色容易看清楚 } else { // 什么也没有,清空右边显示的view self.accessoryView = nil; From 3cb04330f859a00d333ccd7bda55c922911402ae Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 4 Aug 2024 02:39:16 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=8F=B3=E4=BE=A7?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E7=9A=84=E6=96=87=E6=9C=AC=EF=BC=8C=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E7=82=B9=E5=87=BB=E4=BA=8B=E4=BB=B6=20=E4=BE=8B?= =?UTF-8?q?=E5=A6=82=E7=82=B9=E5=87=BB=E5=A4=8D=E5=88=B6=E5=88=B0=E5=89=AA?= =?UTF-8?q?=E5=88=87=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Setting/Setting/ZFettingViewController.m | 12 +++++++++++- ZFSetting/View/ZFSettingCell.m | 3 +++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Setting/Setting/ZFettingViewController.m b/Setting/Setting/ZFettingViewController.m index b8d61b6..c2ebd94 100755 --- a/Setting/Setting/ZFettingViewController.m +++ b/Setting/Setting/ZFettingViewController.m @@ -80,8 +80,18 @@ - (void)add1SectionItems { [weakSelf.navigationController pushViewController:helpVC animated:YES]; }; + NSString *weixinStr =@"xxxxxx"; // 开发者微信 - ZFSettingItem *weixin = [ZFSettingItem itemWithIcon:@"MoreShare" title:@"开发者微信" type:ZFSettingItemTypeText text:@"xxxxxx"]; + ZFSettingItem *weixin = [ZFSettingItem itemWithIcon:@"MoreShare" title:@"开发者微信" type:ZFSettingItemTypeText text:weixinStr]; + weixin.operation = ^{ + //复制到剪切板 + [UIPasteboard generalPasteboard].string = weixinStr; + // 初始化对话框 + UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"提示" message:@"已复制" preferredStyle:UIAlertControllerStyleAlert]; + [alert addAction:[UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:nil]]; + // 弹出对话框 + [self presentViewController:alert animated:true completion:nil]; + }; ZFSettingGroup *group = [[ZFSettingGroup alloc] init]; group.header = @"高级设置"; diff --git a/ZFSetting/View/ZFSettingCell.m b/ZFSetting/View/ZFSettingCell.m index 52ace78..6a454d8 100755 --- a/ZFSetting/View/ZFSettingCell.m +++ b/ZFSetting/View/ZFSettingCell.m @@ -66,6 +66,9 @@ - (void)setItem:(ZFSettingItem *)item { rightLabel.text=item.text; //rightLabel.textAlignment = NSTextAlignment; self.accessoryView= rightLabel; + self.accessoryType = UITableViewCellAccessoryDisclosureIndicator; + // 用默认的选中样式 + self.selectionStyle = UITableViewCellSelectionStyleBlue; //self.accessoryView.backgroundColor= [UIColor lightGrayColor];   //加上红色容易看清楚 } else { // 什么也没有,清空右边显示的view