|
|
@@ -7,7 +7,7 @@
|
|
|
|
|
|
#import "newerGuideView.h"
|
|
|
|
|
|
-@interface newerGuideView ()
|
|
|
+@interface newerGuideView ()<UITextViewDelegate>
|
|
|
@property(nonatomic,strong) UILabel*titleLabel;
|
|
|
|
|
|
|
|
|
@@ -82,20 +82,37 @@
|
|
|
}];
|
|
|
|
|
|
//您可以在【我的>新手引导】查看操作教程
|
|
|
- UILabel *title3Label = [[UILabel alloc] init];
|
|
|
- title3Label.font = [UIFont systemFontOfSize:14.0];
|
|
|
- title3Label.textColor = [UIColor hwColor:@"#0A132B"];
|
|
|
- //title3Label.text = NSLocalizedString(@"NAS_newer_guide_video_to_world",nil);
|
|
|
- title3Label.textAlignment = NSTextAlignmentCenter;
|
|
|
- [whiteBgView addSubview:title3Label];
|
|
|
-
|
|
|
- [title3Label mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
+// UILabel *title3Label = [[UILabel alloc] init];
|
|
|
+// title3Label.font = [UIFont systemFontOfSize:14.0];
|
|
|
+// title3Label.textColor = [UIColor hwColor:@"#0A132B"];
|
|
|
+// //title3Label.text = NSLocalizedString(@"NAS_newer_guide_video_to_world",nil);
|
|
|
+// title3Label.textAlignment = NSTextAlignmentCenter;
|
|
|
+// [whiteBgView addSubview:title3Label];
|
|
|
+//
|
|
|
+// [title3Label mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
+// make.height.mas_equalTo(20);
|
|
|
+// make.left.mas_equalTo(0);
|
|
|
+// make.right.mas_equalTo(0);
|
|
|
+// make.top.equalTo(title2Label.mas_bottom).offset(8);
|
|
|
+// }];
|
|
|
+
|
|
|
+ UITextView *contentTV = [[UITextView alloc] init];
|
|
|
+ contentTV.textColor = [UIColor hwColor:@"#0A132B"];
|
|
|
+// contentTV.font = [UIFont systemFontOfSize:16.0];
|
|
|
+// contentTV.textAlignment = NSTextAlignmentCenter;
|
|
|
+ contentTV.delegate = self;
|
|
|
+ contentTV.editable = NO; //必须禁止输入,否则点击将弹出输入键盘
|
|
|
+ contentTV.scrollEnabled = NO;
|
|
|
+ [whiteBgView addSubview:contentTV];
|
|
|
+
|
|
|
+ [contentTV mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
make.height.mas_equalTo(20);
|
|
|
make.left.mas_equalTo(0);
|
|
|
make.right.mas_equalTo(0);
|
|
|
make.top.equalTo(title2Label.mas_bottom).offset(8);
|
|
|
}];
|
|
|
|
|
|
+
|
|
|
NSString *title1 = NSLocalizedString(@"NAS_newer_guide_video_tip1",nil);
|
|
|
NSString *title2 = NSLocalizedString(@"NAS_newer_guide_video_tip2",nil);
|
|
|
NSString *title3 = NSLocalizedString(@"NAS_newer_guide_video_tip3",nil);
|
|
|
@@ -106,9 +123,21 @@
|
|
|
NSRange redRange = NSMakeRange([fullTitle rangeOfString:title2].location, [fullTitle rangeOfString:title2].length);
|
|
|
UIColor *noteColor =[UIColor hwColor:@"#01B7EA" alpha:1.0];
|
|
|
[attrStr addAttribute:NSForegroundColorAttributeName value:noteColor range:redRange];
|
|
|
- //[attrStr addAttribute:NSFontAttributeName value:[UIFont boldSystemFontOfSize:16.0] range:redRange];
|
|
|
+ [attrStr addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:14.0] range:NSMakeRange(0, attrStr.length)];
|
|
|
+
|
|
|
+ // 设置段落样式以实现水平中间对齐
|
|
|
+ NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
|
|
|
+ paragraphStyle.alignment = NSTextAlignmentCenter; // 水平中间对齐
|
|
|
+ [attrStr addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, attrStr.length)];
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ //title3Label.attributedText = attrStr;
|
|
|
+ [attrStr addAttribute:NSLinkAttributeName
|
|
|
+ value:@"didclick1://"
|
|
|
+ range:redRange];
|
|
|
+ contentTV.attributedText = attrStr;
|
|
|
|
|
|
- title3Label.attributedText = attrStr;
|
|
|
|
|
|
UIButton *leftbut = [[UIButton alloc] init];
|
|
|
leftbut.tag = 1;
|
|
|
@@ -159,7 +188,21 @@
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
+#pragma mark ---- textView Delegate ----
|
|
|
+- (BOOL)textView:(UITextView *)textView shouldInteractWithURL:(NSURL *)URL inRange:(NSRange)characterRange interaction:(UITextItemInteraction)interaction
|
|
|
+{
|
|
|
+
|
|
|
+ if([[URL scheme] isEqualToString:@"didclick1"]){
|
|
|
+ [self removeFromSuperview];
|
|
|
+ if(_didClickButtonFun){
|
|
|
+ _didClickButtonFun(10);
|
|
|
+ }
|
|
|
+ return NO;
|
|
|
+ }
|
|
|
+
|
|
|
+ return YES;
|
|
|
+
|
|
|
+}
|
|
|
|
|
|
#pragma mark 按钮事件
|
|
|
- (void)didClickButtonFun:(UIButton*)but
|