This commit is contained in:
pengguangjian 2025-03-29 16:07:31 +08:00
parent 498778fcf9
commit 56070946d8
14 changed files with 534 additions and 381 deletions

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyTracking</key>
<false/>
<key>NSPrivacyCollectedDataTypes</key>
<array/>
<key>NSPrivacyTrackingDomains</key>
<array/>
<key>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>C617.1</string>
</array>
</dict>
</array>
</dict>
</plist>

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyTracking</key>
<false/>
<key>NSPrivacyTrackingDomains</key>
<array/>
<key>NSPrivacyCollectedDataTypes</key>
<array/>
<key>NSPrivacyAccessedAPITypes</key>
<array/>
</dict>
</plist>

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyTracking</key>
<false/>
<key>NSPrivacyCollectedDataTypes</key>
<array/>
<key>NSPrivacyTrackingDomains</key>
<array/>
<key>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>C617.1</string>
</array>
</dict>
</array>
</dict>
</plist>

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyTracking</key>
<false/>
<key>NSPrivacyCollectedDataTypes</key>
<array/>
<key>NSPrivacyTrackingDomains</key>
<array/>
<key>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>C617.1</string>
</array>
</dict>
</array>
</dict>
</plist>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyTracking</key>
<false/>
<key>NSPrivacyTrackingDomains</key>
<array/>
<key>NSPrivacyCollectedDataTypes</key>
<array/>
<key>NSPrivacyAccessedAPITypes</key>
<array/>
</dict>
</plist>

View File

@ -5682,7 +5682,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = ProductApp/ProductApp.entitlements; CODE_SIGN_ENTITLEMENTS = ProductApp/ProductApp.entitlements;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1; CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = D5PBFE23SF; DEVELOPMENT_TEAM = D5PBFE23SF;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
@ -5726,8 +5726,7 @@
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
INFOPLIST_KEY_UIMainStoryboardFile = Main; INFOPLIST_KEY_UIMainStoryboardFile = Main;
INFOPLIST_KEY_UIRequiredDeviceCapabilities = armv7; INFOPLIST_KEY_UIRequiredDeviceCapabilities = armv7;
INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = UIInterfaceOrientationPortrait;
IPHONEOS_DEPLOYMENT_TARGET = 11.0; IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
@ -5738,7 +5737,7 @@
"$(PROJECT_DIR)/ProductApp/Other/语音/arm/lib", "$(PROJECT_DIR)/ProductApp/Other/语音/arm/lib",
"$(PROJECT_DIR)/ProductApp/BaseControl/Category/RSAEncrypt/lib", "$(PROJECT_DIR)/ProductApp/BaseControl/Category/RSAEncrypt/lib",
); );
MARKETING_VERSION = 2.5.5; MARKETING_VERSION = 2.5.6;
PRODUCT_BUNDLE_IDENTIFIER = com.batiao.aiwrite; PRODUCT_BUNDLE_IDENTIFIER = com.batiao.aiwrite;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_EMIT_LOC_STRINGS = YES;
@ -5754,7 +5753,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = ProductApp/ProductApp.entitlements; CODE_SIGN_ENTITLEMENTS = ProductApp/ProductApp.entitlements;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1; CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = D5PBFE23SF; DEVELOPMENT_TEAM = D5PBFE23SF;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
@ -5798,8 +5797,7 @@
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
INFOPLIST_KEY_UIMainStoryboardFile = Main; INFOPLIST_KEY_UIMainStoryboardFile = Main;
INFOPLIST_KEY_UIRequiredDeviceCapabilities = armv7; INFOPLIST_KEY_UIRequiredDeviceCapabilities = armv7;
INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = UIInterfaceOrientationPortrait;
IPHONEOS_DEPLOYMENT_TARGET = 11.0; IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
@ -5810,7 +5808,7 @@
"$(PROJECT_DIR)/ProductApp/Other/语音/arm/lib", "$(PROJECT_DIR)/ProductApp/Other/语音/arm/lib",
"$(PROJECT_DIR)/ProductApp/BaseControl/Category/RSAEncrypt/lib", "$(PROJECT_DIR)/ProductApp/BaseControl/Category/RSAEncrypt/lib",
); );
MARKETING_VERSION = 2.5.5; MARKETING_VERSION = 2.5.6;
PRODUCT_BUNDLE_IDENTIFIER = com.batiao.aiwrite; PRODUCT_BUNDLE_IDENTIFIER = com.batiao.aiwrite;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_EMIT_LOC_STRINGS = YES;

View File

@ -204,6 +204,12 @@ static void *PlayViewStatusObservationContext = &PlayViewStatusObservationContex
[self addSubview:self.contentView]; [self addSubview:self.contentView];
self.backgroundColor = [UIColor blackColor]; self.backgroundColor = [UIColor blackColor];
[self.contentView addSubview:self.imgvFirst];
[self.imgvFirst mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self.contentView);
}];
//fastForwardView退view //fastForwardView退view
self.FF_View = [[FastForwardView alloc] init]; self.FF_View = [[FastForwardView alloc] init];
self.FF_View.hidden = YES; self.FF_View.hidden = YES;
@ -363,10 +369,10 @@ static void *PlayViewStatusObservationContext = &PlayViewStatusObservationContex
self.loadFailedLabel.hidden = YES; self.loadFailedLabel.hidden = YES;
[self.contentView addSubview:self.loadFailedLabel]; [self.contentView addSubview:self.loadFailedLabel];
[self addSubview:self.imgvFirst]; // [self addSubview:self.imgvFirst];
[self.imgvFirst mas_makeConstraints:^(MASConstraintMaker *make) { // [self.imgvFirst mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self); // make.edges.equalTo(self);
}]; // }];
UIImageView *imgvCenter = [[UIImageView alloc] init]; UIImageView *imgvCenter = [[UIImageView alloc] init];
[imgvCenter setImage:WMPlayerImage(@"player_pause.png")]; [imgvCenter setImage:WMPlayerImage(@"player_pause.png")];
@ -948,7 +954,8 @@ static void *PlayViewStatusObservationContext = &PlayViewStatusObservationContex
if ([WMPlayer IsiPhoneX]) { if ([WMPlayer IsiPhoneX]) {
if (self.isFullscreen) { if (self.isFullscreen) {
[self.contentView mas_remakeConstraints:^(MASConstraintMaker *make) { [self.contentView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.edges.mas_equalTo(UIEdgeInsetsMake(0, 70, 0, 70)); // make.edges.mas_equalTo(UIEdgeInsetsMake(0, 70, 0, 70));
make.edges.mas_equalTo(UIEdgeInsetsMake(0, 0, 0, 0));
}]; }];
[self.bottomView mas_remakeConstraints:^(MASConstraintMaker *make) { [self.bottomView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.leading.trailing.bottom.equalTo(self.contentView); make.leading.trailing.bottom.equalTo(self.contentView);
@ -964,6 +971,30 @@ static void *PlayViewStatusObservationContext = &PlayViewStatusObservationContex
}]; }];
} }
} }
else
{
if (self.isFullscreen) {
[self.contentView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.edges.mas_equalTo(UIEdgeInsetsMake(0, 0, 0, 0));
}];
[self.bottomView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.leading.trailing.bottom.equalTo(self.contentView);
make.height.mas_equalTo(90);
}];
}else{
[self.contentView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.edges.mas_equalTo(UIEdgeInsetsMake(0, 0, 0, 0));
}];
[self.bottomView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.leading.trailing.bottom.equalTo(self.contentView);
make.height.mas_equalTo(50);
}];
}
}
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
self.playerLayer.frame = self.contentView.layer.bounds;
// NSLog(@"ccc = %@",NSStringFromCGRect(self.contentView.layer.bounds));
});
} }
-(void)setBackBtnStyle:(BackBtnStyle)backBtnStyle{ -(void)setBackBtnStyle:(BackBtnStyle)backBtnStyle{
_backBtnStyle = backBtnStyle; _backBtnStyle = backBtnStyle;

View File

@ -61,7 +61,6 @@
-(void)setAttributedText:(NSAttributedString *)attributedText -(void)setAttributedText:(NSAttributedString *)attributedText
{ {
[super setAttributedText:attributedText]; [super setAttributedText:attributedText];
[self.textStorage setAttributedString:attributedText];
} }
// //
@ -73,15 +72,15 @@
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(labelTapped:)]; UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(labelTapped:)];
[self addGestureRecognizer:tap]; [self addGestureRecognizer:tap];
// self.textStorage = [NSTextStorage new]; self.textStorage = [NSTextStorage new];
//
// self.layoutManager = [NSLayoutManager new]; self.layoutManager = [NSLayoutManager new];
//
// self.textContainer = [NSTextContainer new]; self.textContainer = [NSTextContainer new];
//
// [self.textStorage addLayoutManager:self.layoutManager]; [self.textStorage addLayoutManager:self.layoutManager];
//
// [self.layoutManager addTextContainer:self.textContainer]; [self.layoutManager addTextContainer:self.textContainer];
} }
@ -93,6 +92,7 @@
if(gesture.state==UIGestureRecognizerStateBegan) if(gesture.state==UIGestureRecognizerStateBegan)
{ {
[self configWithLabel:self];
[self.superview bringSubviewToFront:self]; [self.superview bringSubviewToFront:self];
if(self.imgvspan) if(self.imgvspan)
{ {
@ -108,26 +108,26 @@
CGRect recttemp = [self characterRectAtIndex:characterIndex]; CGRect recttemp = [self characterRectAtIndex:characterIndex];
self.sizeitem = recttemp.size; self.sizeitem = recttemp.size;
/// // ///
UIImageView *imgvspan = [[UIImageView alloc] initWithFrame:CGRectMake(-15, -(30-recttemp.size.height), 30, 30)]; // UIImageView *imgvspan = [[UIImageView alloc] initWithFrame:CGRectMake(-15, -(30-recttemp.size.height), 30, 30)];
[imgvspan setImage:[UIImage imageNamed:@"copy_up"]]; // [imgvspan setImage:[UIImage imageNamed:@"copy_up"]];
[imgvspan setUserInteractionEnabled:YES]; // [imgvspan setUserInteractionEnabled:YES];
[imgvspan setTag:1]; // [imgvspan setTag:1];
[self addSubview:imgvspan]; // [self addSubview:imgvspan];
_imgvspan = imgvspan; // _imgvspan = imgvspan;
UIPanGestureRecognizer *pan = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(panMoveAction:)]; // UIPanGestureRecognizer *pan = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(panMoveAction:)];
[imgvspan addGestureRecognizer:pan]; // [imgvspan addGestureRecognizer:pan];
//
//
recttemp = [self characterRectAtIndex:self.text.length-1]; // recttemp = [self characterRectAtIndex:self.text.length-1];
UIImageView *imgvspantwo = [[UIImageView alloc] initWithFrame:CGRectMake(recttemp.origin.x+self.sizeitem.width-15, recttemp.origin.y, 30, 30)]; // UIImageView *imgvspantwo = [[UIImageView alloc] initWithFrame:CGRectMake(recttemp.origin.x+self.sizeitem.width-15, recttemp.origin.y, 30, 30)];
[imgvspantwo setImage:[UIImage imageNamed:@"copy_down"]]; // [imgvspantwo setImage:[UIImage imageNamed:@"copy_down"]];
[imgvspantwo setUserInteractionEnabled:YES]; // [imgvspantwo setUserInteractionEnabled:YES];
[imgvspantwo setTag:2]; // [imgvspantwo setTag:2];
[self addSubview:imgvspantwo]; // [self addSubview:imgvspantwo];
_imgvspantwo = imgvspantwo; // _imgvspantwo = imgvspantwo;
UIPanGestureRecognizer *pan1 = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(panMoveAction:)]; // UIPanGestureRecognizer *pan1 = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(panMoveAction:)];
[imgvspantwo addGestureRecognizer:pan1]; // [imgvspantwo addGestureRecognizer:pan1];
/// ///
// UIMenuController // UIMenuController
UIMenuController * menu = [UIMenuController sharedMenuController]; UIMenuController * menu = [UIMenuController sharedMenuController];
@ -292,34 +292,34 @@
NSRange glyphRange = [self.layoutManager glyphRangeForCharacterRange:characterRange actualCharacterRange:nil]; NSRange glyphRange = [self.layoutManager glyphRangeForCharacterRange:characterRange actualCharacterRange:nil];
return [self.layoutManager boundingRectForGlyphRange:glyphRange inTextContainer:self.textContainer]; return [self.layoutManager boundingRectForGlyphRange:glyphRange inTextContainer:self.textContainer];
} }
///// ///
//-(void)configWithLabel:(UILabel *)label -(void)configWithLabel:(UILabel *)label
//{ {
// self.textContainer.size = label.bounds.size; self.textContainer.size = label.bounds.size;
// self.textContainer.lineFragmentPadding = 0; self.textContainer.lineFragmentPadding = 0;
// self.textContainer.maximumNumberOfLines = label.numberOfLines; self.textContainer.maximumNumberOfLines = label.numberOfLines;
// self.textContainer.lineBreakMode = label.lineBreakMode; self.textContainer.lineBreakMode = label.lineBreakMode;
//
// NSMutableAttributedString *attributedText = [[NSMutableAttributedString alloc] initWithString:label.text]; NSMutableAttributedString *attributedText = [[NSMutableAttributedString alloc] initWithString:label.text];
// NSRange textRange = NSMakeRange(0, attributedText.length); NSRange textRange = NSMakeRange(0, attributedText.length);
// [attributedText addAttribute:NSFontAttributeName value:label.font range:textRange]; [attributedText addAttribute:NSFontAttributeName value:label.font range:textRange];
//
//
// [attributedText addAttribute:NSParagraphStyleAttributeName value:self.style range:textRange]; [attributedText addAttribute:NSParagraphStyleAttributeName value:self.style range:textRange];
// [self.textStorage setAttributedString:attributedText]; [self.textStorage setAttributedString:attributedText];
//} }
//-(NSMutableParagraphStyle *)style -(NSMutableParagraphStyle *)style
//{ {
// if(!_style) if(!_style)
// { {
// NSMutableParagraphStyle *style = [NSMutableParagraphStyle new]; NSMutableParagraphStyle *style = [NSMutableParagraphStyle new];
// style.lineSpacing = 5.2; style.lineSpacing = 5.2;
// style.lineBreakMode = NSLineBreakByCharWrapping; style.lineBreakMode = NSLineBreakByCharWrapping;
// style.alignment = NSTextAlignmentLeft; style.alignment = NSTextAlignmentLeft;
// _style = style; _style = style;
// } }
// return _style; return _style;
//} }
// label // label
@ -353,30 +353,30 @@
} }
- (NSInteger)characterIndexAtPoint:(CGPoint)point label:(UILabel *)label - (NSInteger)characterIndexAtPoint:(CGPoint)point label:(UILabel *)label
{ {
NSTextContainer *textContainer = [[NSTextContainer alloc] initWithSize:label.bounds.size]; // NSTextContainer *textContainer = [[NSTextContainer alloc] initWithSize:label.bounds.size];
textContainer.lineFragmentPadding = 0; // textContainer.lineFragmentPadding = 0;
textContainer.maximumNumberOfLines = label.numberOfLines; // textContainer.maximumNumberOfLines = label.numberOfLines;
textContainer.lineBreakMode = label.lineBreakMode; // textContainer.lineBreakMode = label.lineBreakMode;
self.textContainer = textContainer; // self.textContainer = textContainer;
//
// NSLayoutManager *layoutManager = [[NSLayoutManager alloc] init];
// [layoutManager addTextContainer:textContainer];
// self.layoutManager = layoutManager;
//
// NSTextStorage *textStorage = [[NSTextStorage alloc] initWithAttributedString:label.attributedText];
// [textStorage addLayoutManager:layoutManager];
// self.textStorage = textStorage;
NSLayoutManager *layoutManager = [[NSLayoutManager alloc] init]; [self.textStorage setAttributedString:self.attributedText];
[layoutManager addTextContainer:textContainer];
self.layoutManager = layoutManager;
NSTextStorage *textStorage = [[NSTextStorage alloc] initWithAttributedString:label.attributedText]; CGRect textBoundingBox = [self.layoutManager usedRectForTextContainer:self.textContainer];
[textStorage addLayoutManager:layoutManager];
self.textStorage = textStorage;
[self.textStorage setAttributedString:label.attributedText];
CGRect textBoundingBox = [layoutManager usedRectForTextContainer:textContainer];
CGPoint textContainerOffset = CGPointMake((label.bounds.size.width - textBoundingBox.size.width) *0.5 - textBoundingBox.origin.x,(label.bounds.size.height - textBoundingBox.size.height) * 0.5 -textBoundingBox.origin.y); CGPoint textContainerOffset = CGPointMake((label.bounds.size.width - textBoundingBox.size.width) *0.5 - textBoundingBox.origin.x,(label.bounds.size.height - textBoundingBox.size.height) * 0.5 -textBoundingBox.origin.y);
CGPoint adjustedPoint = CGPointMake(point.x - textContainerOffset.x, point.y -textContainerOffset.y); CGPoint adjustedPoint = CGPointMake(point.x - textContainerOffset.x, point.y -textContainerOffset.y);
NSInteger characterindex = [layoutManager characterIndexForPoint:adjustedPoint NSInteger characterindex = [self.layoutManager characterIndexForPoint:adjustedPoint
inTextContainer:textContainer inTextContainer:self.textContainer
fractionOfDistanceBetweenInsertionPoints:nil]; fractionOfDistanceBetweenInsertionPoints:nil];
return characterindex; return characterindex;
} }

View File

@ -84,7 +84,7 @@
} }
else else
{ {
[self.imgvback sd_setImageWithURL:[NSURL URLWithString:[Tools isStringnil:strimageurl]] placeholderImage:nil]; [self.imgvback sd_setImageWithURL:[NSURL URLWithString:[Tools isStringnil:strimageurl]] placeholderImage:[UIImage imageNamed:[NSString stringWithFormat:@"ai_%@",self.strname]]];
} }
} }

View File

@ -9,6 +9,8 @@
@interface StartKTXZPGDetailTabView () @interface StartKTXZPGDetailTabView ()
/// ///
@property (nonatomic , strong) UIScrollView *scvback;
///
@property (nonatomic , strong) NSMutableArray *arrbtn; @property (nonatomic , strong) NSMutableArray *arrbtn;
/// ///
@property (nonatomic , strong) UIButton *btselect; @property (nonatomic , strong) UIButton *btselect;
@ -23,7 +25,14 @@
{ {
if(self = [super initWithFrame:frame]) if(self = [super initWithFrame:frame])
{ {
UIScrollView *scvback = [[UIScrollView alloc] init];
[self addSubview:scvback];
[scvback mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.top.offset(0);
make.width.height.equalTo(self);
}];
[scvback setShowsHorizontalScrollIndicator:NO];
_scvback = scvback;
} }
return self; return self;
} }
@ -31,14 +40,23 @@
{ {
if(arrTitle.count==0)return; if(arrTitle.count==0)return;
for(UIView *view in self.subviews) for(UIView *view in self.arrbtn)
{ {
[view removeFromSuperview]; [view removeFromSuperview];
} }
if(self.imgvico)
{
[self.imgvico removeFromSuperview];
}
_arrTitle = arrTitle; _arrTitle = arrTitle;
self.arrbtn = [NSMutableArray new]; self.arrbtn = [NSMutableArray new];
float f_width = UISCREEN_WIDTH/arrTitle.count; float f_width = UISCREEN_WIDTH/arrTitle.count;
if(arrTitle.count>4)
{
f_width = UISCREEN_WIDTH/4.0;
}
UIView *viewlast = nil;
NSArray *arr = arrTitle; NSArray *arr = arrTitle;
for(int i = 0 ; i < arr.count; i++) for(int i = 0 ; i < arr.count; i++)
{ {
@ -47,9 +65,9 @@
[btitem setTitleColor:RGBCOLOR(109, 109, 109) forState:UIControlStateNormal]; [btitem setTitleColor:RGBCOLOR(109, 109, 109) forState:UIControlStateNormal];
[btitem setTitleColor:RGBCOLOR(61, 61, 61) forState:UIControlStateSelected]; [btitem setTitleColor:RGBCOLOR(61, 61, 61) forState:UIControlStateSelected];
[btitem.titleLabel setFont:[UIFont systemFontOfSize:14]]; [btitem.titleLabel setFont:[UIFont systemFontOfSize:14]];
[self addSubview:btitem]; [self.scvback addSubview:btitem];
[btitem mas_makeConstraints:^(MASConstraintMaker *make) { [btitem mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.bottom.equalTo(self); make.top.height.equalTo(self.scvback);
make.left.offset(f_width*i); make.left.offset(f_width*i);
make.width.offset(f_width); make.width.offset(f_width);
}]; }];
@ -62,12 +80,20 @@
[self.btselect setSelected:YES]; [self.btselect setSelected:YES];
[btitem.titleLabel setFont:[UIFont systemFontOfSize:18]]; [btitem.titleLabel setFont:[UIFont systemFontOfSize:18]];
} }
viewlast = btitem;
} }
if(viewlast)
{
[self.scvback mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(viewlast);
}];
}
UIImageView *imgvico = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 84, 14)]; UIImageView *imgvico = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 84, 14)];
[imgvico setImage:[UIImage imageNamed:@"yd_pg_hd"]]; [imgvico setImage:[UIImage imageNamed:@"yd_pg_hd"]];
[self addSubview:imgvico]; [self.scvback addSubview:imgvico];
[self sendSubviewToBack:imgvico]; [self.scvback sendSubviewToBack:imgvico];
_imgvico = imgvico; _imgvico = imgvico;
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.01 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.01 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[imgvico setCenterX:self.btselect.centerX]; [imgvico setCenterX:self.btselect.centerX];

View File

@ -601,7 +601,7 @@
/// ///
-(void)getTools -(void)getTools
{ {
[NetWorkManager requestToolsListData:self.view page:1 size:@"8" type_id:@"" tool_name:@"" is_recommend:@"0" Callback:^(BOOL state, ToolsListModel *responseObject, NSString * _Nullable describle) { [NetWorkManager requestToolsListData:self.view page:1 size:@"1000" type_id:@"" tool_name:@"" is_recommend:@"0" Callback:^(BOOL state, ToolsListModel *responseObject, NSString * _Nullable describle) {
[self.tableView.mj_header endRefreshing]; [self.tableView.mj_header endRefreshing];
if(state) if(state)
{ {

View File

@ -598,6 +598,7 @@
[self.player mas_remakeConstraints:^(MASConstraintMaker *make) { [self.player mas_remakeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self.viewAlterplayer); make.edges.equalTo(self.viewAlterplayer);
}]; }];
[self.player pause];
UIButton *btfull = [[UIButton alloc] init]; UIButton *btfull = [[UIButton alloc] init];
[self.viewAlterplayer addSubview:btfull]; [self.viewAlterplayer addSubview:btfull];
@ -785,10 +786,13 @@
[view addSubview:self.player]; [view addSubview:self.player];
self.viewplayer = view; self.viewplayer = view;
[self.player mas_remakeConstraints:^(MASConstraintMaker *make) { [self.player mas_remakeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(view); make.left.top.offset(0);
make.width.offset(UISCREEN_WIDTH);
make.height.offset(UISCREEN_HEIGHT);
}]; }];
self.player.isFullscreen = YES; self.player.isFullscreen = YES;
[self.player bottomViewShow:YES]; [self.player bottomViewShow:YES];
[self.player setNeedsDisplay];
} }
// //
-(void)wmplayer:(WMPlayer *)wmplayer clickedFullScreenButton:(UIButton *)fullScreenBtn -(void)wmplayer:(WMPlayer *)wmplayer clickedFullScreenButton:(UIButton *)fullScreenBtn