Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit09a4359

Browse files
committed
「iOS 企业版、个人版」上线文字引导提醒
1 parente069d27 commit09a4359

File tree

3 files changed

+66
-27
lines changed

3 files changed

+66
-27
lines changed

‎Coding_iOS/Coding_Enterprise_iOS-Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<key>CFBundlePackageType</key>
1818
<string>APPL</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>2.9.9</string>
20+
<string>2.9.10</string>
2121
<key>CFBundleSignature</key>
2222
<string>????</string>
2323
<key>CFBundleURLTypes</key>
@@ -28,7 +28,7 @@
2828
</dict>
2929
</array>
3030
<key>CFBundleVersion</key>
31-
<string>2.9.9.20181114.1</string>
31+
<string>2.9.10.20190219.1</string>
3232
<key>ITSAppUsesNonExemptEncryption</key>
3333
<false/>
3434
<key>LSApplicationQueriesSchemes</key>

‎Coding_iOS/Coding_iOS-Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<key>CFBundlePackageType</key>
1818
<string>APPL</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>5.4.4</string>
20+
<string>5.4.5</string>
2121
<key>CFBundleSignature</key>
2222
<string>????</string>
2323
<key>CFBundleURLTypes</key>
@@ -37,7 +37,7 @@
3737
</dict>
3838
</array>
3939
<key>CFBundleVersion</key>
40-
<string>5.4.4.20181114.1</string>
40+
<string>5.4.5.20190219.1</string>
4141
<key>ITSAppUsesNonExemptEncryption</key>
4242
<false/>
4343
<key>LSApplicationQueriesSchemes</key>

‎Coding_iOS/Views/TableListView/ProjectListView.m

Lines changed: 62 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -253,11 +253,21 @@ - (NSString *)p_appID{
253253
}
254254

255255
- (BOOL)p_needToCheckIfNewVersion{
256-
return (!_isHeaderClosed && (_useNewStyle && _myProjects.type == ProjectsTypeAll) && !self.isNewerVersionAvailable);
256+
return (!_isHeaderClosed &&
257+
(_useNewStyle && _myProjects.type == ProjectsTypeAll) &&
258+
!self.isNewerVersionAvailable);
257259
}
258260

259261
- (BOOL)p_needToShowVersionTip{
260-
return (!_isHeaderClosed && (_useNewStyle && _myProjects.type == ProjectsTypeAll) && self.isNewerVersionAvailable);
262+
return (!_isHeaderClosed &&
263+
(_useNewStyle && _myProjects.type == ProjectsTypeAll) &&
264+
self.isNewerVersionAvailable);
265+
}
266+
267+
- (BOOL)p_needToShowHeaderTip{
268+
return (!_isHeaderClosed &&
269+
(_useNewStyle && _myProjects.type == ProjectsTypeAll) &&
270+
(self.isNewerVersionAvailable || ![NSObjectisPrivateCloud].boolValue));
261271
}
262272

263273
- (void)refreshUI{
@@ -353,11 +363,21 @@ - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
353363
}
354364

355365
- (CGFloat)tableView:(UITableView *)tableViewheightForHeaderInSection:(NSInteger)section{
356-
return [selfp_needToShowVersionTip]?40:0;
366+
if ([selfp_needToShowHeaderTip]) {
367+
static UILabel *tipL;
368+
if (!tipL) {
369+
tipL = [UILabellabelWithFont:[UIFontsystemFontOfSize:12]textColor:[UIColorcolorWithHexString:@"0x136BFB"]];
370+
tipL.numberOfLines =0;
371+
}
372+
tipL.attributedText = [selfp_headerTipStr];
373+
return [tipLsizeThatFits:CGSizeMake(kScreen_Width -40 *1, CGFLOAT_MAX)].height +16;
374+
}else {
375+
return0;
376+
}
357377
}
358378

359379
- (UIView *)tableView:(UITableView *)tableViewviewForHeaderInSection:(NSInteger)section{
360-
if ([selfp_needToShowVersionTip]) {
380+
if ([selfp_needToShowHeaderTip]) {
361381
UIView *headerV = [[UIViewalloc]initWithFrame:CGRectMake(0,0,kScreen_Width,40)];
362382
headerV.backgroundColor = [UIColorcolorWithHexString:@"0xECF9FF"];
363383
__weaktypeof(self) weakSelf = self;
@@ -368,32 +388,51 @@ - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger
368388
}forControlEvents:UIControlEventTouchUpInside];
369389
[headerVaddSubview:closeBtn];
370390
[closeBtnmas_makeConstraints:^(MASConstraintMaker *make) {
371-
make.top.bottom.right.equalTo(headerV);
372-
make.width.equalTo(closeBtn.mas_height);
391+
make.top.right.equalTo(headerV);
392+
make.width.mas_equalTo(40);
393+
make.height.mas_equalTo(36);// 文字单行显示时的高度
373394
}];
374-
UIImageView *noticeV = [[UIImageViewalloc]initWithImage:[UIImageimageNamed:@"button_tip_notice"]];
375-
noticeV.contentMode = UIViewContentModeCenter;
376-
[headerVaddSubview:noticeV];
377-
[noticeVmas_makeConstraints:^(MASConstraintMaker *make) {
378-
make.top.bottom.left.equalTo(headerV);
379-
make.width.equalTo(noticeV.mas_height);
380-
}];
381-
UILabel *tipL = [UILabellabelWithFont:[UIFontsystemFontOfSize:15]textColor:[UIColorcolorWithHexString:@"0x136BFB"]];
382-
tipL.adjustsFontSizeToFitWidth =YES;
383-
tipL.minimumScaleFactor = .5;
395+
// UIImageView *noticeV = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"button_tip_notice"]];
396+
// noticeV.contentMode = UIViewContentModeCenter;
397+
// [headerV addSubview:noticeV];
398+
// [noticeV mas_makeConstraints:^(MASConstraintMaker *make) {
399+
// make.top.bottom.left.equalTo(headerV);
400+
// make.width.mas_equalTo(0);
401+
// }];
402+
UILabel *tipL = [UILabellabelWithFont:[UIFontsystemFontOfSize:12]textColor:[UIColorcolorWithHexString:@"0x136BFB"]];
403+
tipL.numberOfLines =0;
384404
tipL.userInteractionEnabled =YES;
385-
tipL.text =kTarget_Enterprise?@"立即升级最新 CODING 企业版客户端":@"立即升级最新 Coding 客户端";
386-
[tipLbk_whenTapped:^{
387-
[[UIApplicationsharedApplication]openURL:[NSURLURLWithString:kAppUrl]];
388-
}];
405+
tipL.attributedText = [selfp_headerTipStr];
406+
if ([selfp_needToShowVersionTip]) {
407+
[tipLbk_whenTapped:^{
408+
[[UIApplicationsharedApplication]openURL:[NSURLURLWithString:kAppUrl]];
409+
}];
410+
}
389411
[headerVaddSubview:tipL];
390412
[tipLmas_makeConstraints:^(MASConstraintMaker *make) {
391-
make.centerY.equalTo(headerV);
392-
make.left.equalTo(noticeV.mas_right);
413+
make.centerY.equalTo(headerV).mas_offset(3);
414+
make.left.equalTo(headerV).offset(15);
393415
make.right.equalTo(closeBtn.mas_left);
394416
}];
395417
return headerV;
396-
}else{
418+
}else {
419+
returnnil;
420+
}
421+
}
422+
423+
- (NSAttributedString *)p_headerTipStr{
424+
if ([selfp_needToShowHeaderTip]) {
425+
NSString *tipStr;
426+
if ([selfp_needToShowVersionTip]) {
427+
tipStr =kTarget_Enterprise?@"立即升级最新 CODING 企业版客户端":@"立即升级最新 Coding 客户端";
428+
}else {
429+
tipStr =@"温馨提示:出于实际使用场景限制的考虑,该 App 不再进行更多新功能开发,建议您前往 PC 端网页版体验更完整的产品功能。";
430+
}
431+
NSMutableParagraphStyle *paragraphStyle = [NSMutableParagraphStylenew];
432+
paragraphStyle.lineSpacing =6;
433+
NSDictionary *attributes = @{NSParagraphStyleAttributeName: paragraphStyle};
434+
return [[NSAttributedStringalloc]initWithString:tipStrattributes:attributes];
435+
}else {
397436
returnnil;
398437
}
399438
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp