2.5.6
This commit is contained in:
parent
498778fcf9
commit
56070946d8
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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
|
@ -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>
|
|
@ -5682,7 +5682,7 @@
|
|||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
CODE_SIGN_ENTITLEMENTS = ProductApp/ProductApp.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
CURRENT_PROJECT_VERSION = 3;
|
||||
DEVELOPMENT_TEAM = D5PBFE23SF;
|
||||
ENABLE_BITCODE = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
|
@ -5726,8 +5726,7 @@
|
|||
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
|
||||
INFOPLIST_KEY_UIMainStoryboardFile = Main;
|
||||
INFOPLIST_KEY_UIRequiredDeviceCapabilities = armv7;
|
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
|
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = UIInterfaceOrientationPortrait;
|
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
|
@ -5738,7 +5737,7 @@
|
|||
"$(PROJECT_DIR)/ProductApp/Other/语音/arm/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_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
|
@ -5754,7 +5753,7 @@
|
|||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
CODE_SIGN_ENTITLEMENTS = ProductApp/ProductApp.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
CURRENT_PROJECT_VERSION = 3;
|
||||
DEVELOPMENT_TEAM = D5PBFE23SF;
|
||||
ENABLE_BITCODE = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
|
@ -5798,8 +5797,7 @@
|
|||
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
|
||||
INFOPLIST_KEY_UIMainStoryboardFile = Main;
|
||||
INFOPLIST_KEY_UIRequiredDeviceCapabilities = armv7;
|
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
|
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = UIInterfaceOrientationPortrait;
|
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
|
@ -5810,7 +5808,7 @@
|
|||
"$(PROJECT_DIR)/ProductApp/Other/语音/arm/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_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
|
|
Binary file not shown.
|
@ -204,6 +204,12 @@ static void *PlayViewStatusObservationContext = &PlayViewStatusObservationContex
|
|||
[self addSubview:self.contentView];
|
||||
self.backgroundColor = [UIColor blackColor];
|
||||
|
||||
|
||||
[self.contentView addSubview:self.imgvFirst];
|
||||
[self.imgvFirst mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.equalTo(self.contentView);
|
||||
}];
|
||||
|
||||
//创建fastForwardView,快进⏩和快退的view
|
||||
self.FF_View = [[FastForwardView alloc] init];
|
||||
self.FF_View.hidden = YES;
|
||||
|
@ -363,10 +369,10 @@ static void *PlayViewStatusObservationContext = &PlayViewStatusObservationContex
|
|||
self.loadFailedLabel.hidden = YES;
|
||||
[self.contentView addSubview:self.loadFailedLabel];
|
||||
|
||||
[self addSubview:self.imgvFirst];
|
||||
[self.imgvFirst mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.equalTo(self);
|
||||
}];
|
||||
// [self addSubview:self.imgvFirst];
|
||||
// [self.imgvFirst mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.edges.equalTo(self);
|
||||
// }];
|
||||
|
||||
UIImageView *imgvCenter = [[UIImageView alloc] init];
|
||||
[imgvCenter setImage:WMPlayerImage(@"player_pause.png")];
|
||||
|
@ -948,7 +954,8 @@ static void *PlayViewStatusObservationContext = &PlayViewStatusObservationContex
|
|||
if ([WMPlayer IsiPhoneX]) {
|
||||
if (self.isFullscreen) {
|
||||
[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) {
|
||||
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{
|
||||
_backBtnStyle = backBtnStyle;
|
||||
|
|
|
@ -61,7 +61,6 @@
|
|||
-(void)setAttributedText:(NSAttributedString *)attributedText
|
||||
{
|
||||
[super setAttributedText:attributedText];
|
||||
[self.textStorage setAttributedString:attributedText];
|
||||
}
|
||||
|
||||
// 设置长按事件
|
||||
|
@ -73,15 +72,15 @@
|
|||
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(labelTapped:)];
|
||||
[self addGestureRecognizer:tap];
|
||||
|
||||
// self.textStorage = [NSTextStorage new];
|
||||
//
|
||||
// self.layoutManager = [NSLayoutManager new];
|
||||
//
|
||||
// self.textContainer = [NSTextContainer new];
|
||||
//
|
||||
// [self.textStorage addLayoutManager:self.layoutManager];
|
||||
//
|
||||
// [self.layoutManager addTextContainer:self.textContainer];
|
||||
self.textStorage = [NSTextStorage new];
|
||||
|
||||
self.layoutManager = [NSLayoutManager new];
|
||||
|
||||
self.textContainer = [NSTextContainer new];
|
||||
|
||||
[self.textStorage addLayoutManager:self.layoutManager];
|
||||
|
||||
[self.layoutManager addTextContainer:self.textContainer];
|
||||
|
||||
}
|
||||
|
||||
|
@ -93,6 +92,7 @@
|
|||
|
||||
if(gesture.state==UIGestureRecognizerStateBegan)
|
||||
{
|
||||
[self configWithLabel:self];
|
||||
[self.superview bringSubviewToFront:self];
|
||||
if(self.imgvspan)
|
||||
{
|
||||
|
@ -108,26 +108,26 @@
|
|||
CGRect recttemp = [self characterRectAtIndex:characterIndex];
|
||||
self.sizeitem = recttemp.size;
|
||||
|
||||
///两个拖动的标
|
||||
UIImageView *imgvspan = [[UIImageView alloc] initWithFrame:CGRectMake(-15, -(30-recttemp.size.height), 30, 30)];
|
||||
[imgvspan setImage:[UIImage imageNamed:@"copy_up"]];
|
||||
[imgvspan setUserInteractionEnabled:YES];
|
||||
[imgvspan setTag:1];
|
||||
[self addSubview:imgvspan];
|
||||
_imgvspan = imgvspan;
|
||||
UIPanGestureRecognizer *pan = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(panMoveAction:)];
|
||||
[imgvspan addGestureRecognizer:pan];
|
||||
|
||||
|
||||
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)];
|
||||
[imgvspantwo setImage:[UIImage imageNamed:@"copy_down"]];
|
||||
[imgvspantwo setUserInteractionEnabled:YES];
|
||||
[imgvspantwo setTag:2];
|
||||
[self addSubview:imgvspantwo];
|
||||
_imgvspantwo = imgvspantwo;
|
||||
UIPanGestureRecognizer *pan1 = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(panMoveAction:)];
|
||||
[imgvspantwo addGestureRecognizer:pan1];
|
||||
// ///两个拖动的标
|
||||
// UIImageView *imgvspan = [[UIImageView alloc] initWithFrame:CGRectMake(-15, -(30-recttemp.size.height), 30, 30)];
|
||||
// [imgvspan setImage:[UIImage imageNamed:@"copy_up"]];
|
||||
// [imgvspan setUserInteractionEnabled:YES];
|
||||
// [imgvspan setTag:1];
|
||||
// [self addSubview:imgvspan];
|
||||
// _imgvspan = imgvspan;
|
||||
// UIPanGestureRecognizer *pan = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(panMoveAction:)];
|
||||
// [imgvspan addGestureRecognizer:pan];
|
||||
//
|
||||
//
|
||||
// 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)];
|
||||
// [imgvspantwo setImage:[UIImage imageNamed:@"copy_down"]];
|
||||
// [imgvspantwo setUserInteractionEnabled:YES];
|
||||
// [imgvspantwo setTag:2];
|
||||
// [self addSubview:imgvspantwo];
|
||||
// _imgvspantwo = imgvspantwo;
|
||||
// UIPanGestureRecognizer *pan1 = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(panMoveAction:)];
|
||||
// [imgvspantwo addGestureRecognizer:pan1];
|
||||
///复制的位置
|
||||
// 自定义 UIMenuController
|
||||
UIMenuController * menu = [UIMenuController sharedMenuController];
|
||||
|
@ -292,34 +292,34 @@
|
|||
NSRange glyphRange = [self.layoutManager glyphRangeForCharacterRange:characterRange actualCharacterRange:nil];
|
||||
return [self.layoutManager boundingRectForGlyphRange:glyphRange inTextContainer:self.textContainer];
|
||||
}
|
||||
/////配置信息
|
||||
//-(void)configWithLabel:(UILabel *)label
|
||||
//{
|
||||
// self.textContainer.size = label.bounds.size;
|
||||
// self.textContainer.lineFragmentPadding = 0;
|
||||
// self.textContainer.maximumNumberOfLines = label.numberOfLines;
|
||||
// self.textContainer.lineBreakMode = label.lineBreakMode;
|
||||
//
|
||||
// NSMutableAttributedString *attributedText = [[NSMutableAttributedString alloc] initWithString:label.text];
|
||||
// NSRange textRange = NSMakeRange(0, attributedText.length);
|
||||
// [attributedText addAttribute:NSFontAttributeName value:label.font range:textRange];
|
||||
//
|
||||
//
|
||||
// [attributedText addAttribute:NSParagraphStyleAttributeName value:self.style range:textRange];
|
||||
// [self.textStorage setAttributedString:attributedText];
|
||||
//}
|
||||
//-(NSMutableParagraphStyle *)style
|
||||
//{
|
||||
// if(!_style)
|
||||
// {
|
||||
// NSMutableParagraphStyle *style = [NSMutableParagraphStyle new];
|
||||
// style.lineSpacing = 5.2;
|
||||
// style.lineBreakMode = NSLineBreakByCharWrapping;
|
||||
// style.alignment = NSTextAlignmentLeft;
|
||||
// _style = style;
|
||||
// }
|
||||
// return _style;
|
||||
//}
|
||||
///配置信息
|
||||
-(void)configWithLabel:(UILabel *)label
|
||||
{
|
||||
self.textContainer.size = label.bounds.size;
|
||||
self.textContainer.lineFragmentPadding = 0;
|
||||
self.textContainer.maximumNumberOfLines = label.numberOfLines;
|
||||
self.textContainer.lineBreakMode = label.lineBreakMode;
|
||||
|
||||
NSMutableAttributedString *attributedText = [[NSMutableAttributedString alloc] initWithString:label.text];
|
||||
NSRange textRange = NSMakeRange(0, attributedText.length);
|
||||
[attributedText addAttribute:NSFontAttributeName value:label.font range:textRange];
|
||||
|
||||
|
||||
[attributedText addAttribute:NSParagraphStyleAttributeName value:self.style range:textRange];
|
||||
[self.textStorage setAttributedString:attributedText];
|
||||
}
|
||||
-(NSMutableParagraphStyle *)style
|
||||
{
|
||||
if(!_style)
|
||||
{
|
||||
NSMutableParagraphStyle *style = [NSMutableParagraphStyle new];
|
||||
style.lineSpacing = 5.2;
|
||||
style.lineBreakMode = NSLineBreakByCharWrapping;
|
||||
style.alignment = NSTextAlignmentLeft;
|
||||
_style = style;
|
||||
}
|
||||
return _style;
|
||||
}
|
||||
|
||||
|
||||
// 设置label能够执行那些具体操作
|
||||
|
@ -353,30 +353,30 @@
|
|||
}
|
||||
- (NSInteger)characterIndexAtPoint:(CGPoint)point label:(UILabel *)label
|
||||
{
|
||||
NSTextContainer *textContainer = [[NSTextContainer alloc] initWithSize:label.bounds.size];
|
||||
textContainer.lineFragmentPadding = 0;
|
||||
textContainer.maximumNumberOfLines = label.numberOfLines;
|
||||
textContainer.lineBreakMode = label.lineBreakMode;
|
||||
self.textContainer = textContainer;
|
||||
// NSTextContainer *textContainer = [[NSTextContainer alloc] initWithSize:label.bounds.size];
|
||||
// textContainer.lineFragmentPadding = 0;
|
||||
// textContainer.maximumNumberOfLines = label.numberOfLines;
|
||||
// textContainer.lineBreakMode = label.lineBreakMode;
|
||||
// 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];
|
||||
[layoutManager addTextContainer:textContainer];
|
||||
self.layoutManager = layoutManager;
|
||||
[self.textStorage setAttributedString:self.attributedText];
|
||||
|
||||
NSTextStorage *textStorage = [[NSTextStorage alloc] initWithAttributedString:label.attributedText];
|
||||
[textStorage addLayoutManager:layoutManager];
|
||||
self.textStorage = textStorage;
|
||||
|
||||
[self.textStorage setAttributedString:label.attributedText];
|
||||
|
||||
CGRect textBoundingBox = [layoutManager usedRectForTextContainer:textContainer];
|
||||
CGRect textBoundingBox = [self.layoutManager usedRectForTextContainer:self.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 adjustedPoint = CGPointMake(point.x - textContainerOffset.x, point.y -textContainerOffset.y);
|
||||
|
||||
NSInteger characterindex = [layoutManager characterIndexForPoint:adjustedPoint
|
||||
inTextContainer:textContainer
|
||||
NSInteger characterindex = [self.layoutManager characterIndexForPoint:adjustedPoint
|
||||
inTextContainer:self.textContainer
|
||||
fractionOfDistanceBetweenInsertionPoints:nil];
|
||||
return characterindex;
|
||||
}
|
||||
|
|
|
@ -84,7 +84,7 @@
|
|||
}
|
||||
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]]];
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
|
||||
@interface StartKTXZPGDetailTabView ()
|
||||
///
|
||||
@property (nonatomic , strong) UIScrollView *scvback;
|
||||
///
|
||||
@property (nonatomic , strong) NSMutableArray *arrbtn;
|
||||
///
|
||||
@property (nonatomic , strong) UIButton *btselect;
|
||||
|
@ -23,7 +25,14 @@
|
|||
{
|
||||
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;
|
||||
}
|
||||
|
@ -31,14 +40,23 @@
|
|||
{
|
||||
if(arrTitle.count==0)return;
|
||||
|
||||
for(UIView *view in self.subviews)
|
||||
for(UIView *view in self.arrbtn)
|
||||
{
|
||||
[view removeFromSuperview];
|
||||
}
|
||||
if(self.imgvico)
|
||||
{
|
||||
[self.imgvico removeFromSuperview];
|
||||
}
|
||||
_arrTitle = arrTitle;
|
||||
|
||||
self.arrbtn = [NSMutableArray new];
|
||||
float f_width = UISCREEN_WIDTH/arrTitle.count;
|
||||
if(arrTitle.count>4)
|
||||
{
|
||||
f_width = UISCREEN_WIDTH/4.0;
|
||||
}
|
||||
UIView *viewlast = nil;
|
||||
NSArray *arr = arrTitle;
|
||||
for(int i = 0 ; i < arr.count; i++)
|
||||
{
|
||||
|
@ -47,9 +65,9 @@
|
|||
[btitem setTitleColor:RGBCOLOR(109, 109, 109) forState:UIControlStateNormal];
|
||||
[btitem setTitleColor:RGBCOLOR(61, 61, 61) forState:UIControlStateSelected];
|
||||
[btitem.titleLabel setFont:[UIFont systemFontOfSize:14]];
|
||||
[self addSubview:btitem];
|
||||
[self.scvback addSubview:btitem];
|
||||
[btitem mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.bottom.equalTo(self);
|
||||
make.top.height.equalTo(self.scvback);
|
||||
make.left.offset(f_width*i);
|
||||
make.width.offset(f_width);
|
||||
}];
|
||||
|
@ -62,12 +80,20 @@
|
|||
[self.btselect setSelected:YES];
|
||||
[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)];
|
||||
[imgvico setImage:[UIImage imageNamed:@"yd_pg_hd"]];
|
||||
[self addSubview:imgvico];
|
||||
[self sendSubviewToBack:imgvico];
|
||||
[self.scvback addSubview:imgvico];
|
||||
[self.scvback sendSubviewToBack:imgvico];
|
||||
_imgvico = imgvico;
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.01 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
[imgvico setCenterX:self.btselect.centerX];
|
||||
|
|
|
@ -601,7 +601,7 @@
|
|||
///常用工具
|
||||
-(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];
|
||||
if(state)
|
||||
{
|
||||
|
|
|
@ -598,6 +598,7 @@
|
|||
[self.player mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.equalTo(self.viewAlterplayer);
|
||||
}];
|
||||
[self.player pause];
|
||||
|
||||
UIButton *btfull = [[UIButton alloc] init];
|
||||
[self.viewAlterplayer addSubview:btfull];
|
||||
|
@ -785,10 +786,13 @@
|
|||
[view addSubview:self.player];
|
||||
self.viewplayer = view;
|
||||
[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 bottomViewShow:YES];
|
||||
[self.player setNeedsDisplay];
|
||||
}
|
||||
//点击全屏按钮代理方法
|
||||
-(void)wmplayer:(WMPlayer *)wmplayer clickedFullScreenButton:(UIButton *)fullScreenBtn
|
||||
|
|
Loading…
Reference in New Issue