范文列表

This commit is contained in:
pengguangjian 2024-10-08 18:29:59 +08:00
parent a169f067e4
commit f3171974d7
61 changed files with 1503 additions and 45 deletions

View File

@ -18,6 +18,12 @@
CA0C3A9E2CB4DADA00E01A72 /* DuanLuoXieZuoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CA0C3A9D2CB4DADA00E01A72 /* DuanLuoXieZuoViewController.m */; };
CA0C3AA22CB4DBB900E01A72 /* DuanLuoXieZuoView.m in Sources */ = {isa = PBXBuildFile; fileRef = CA0C3AA12CB4DBB900E01A72 /* DuanLuoXieZuoView.m */; };
CA0C3AA52CB4DED200E01A72 /* DuanLuoXieZuoCellView.m in Sources */ = {isa = PBXBuildFile; fileRef = CA0C3AA42CB4DED200E01A72 /* DuanLuoXieZuoCellView.m */; };
CA0C3AA92CB4FE6300E01A72 /* DuanLuoXieZuoQWViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CA0C3AA82CB4FE6300E01A72 /* DuanLuoXieZuoQWViewController.m */; };
CA0C3AAD2CB4FF0300E01A72 /* DuanLuoXieZuoQWView.m in Sources */ = {isa = PBXBuildFile; fileRef = CA0C3AAC2CB4FF0300E01A72 /* DuanLuoXieZuoQWView.m */; };
CA0C3AB12CB5053600E01A72 /* ZhiNengPPTViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CA0C3AB02CB5053600E01A72 /* ZhiNengPPTViewController.m */; };
CA0C3AB52CB5061500E01A72 /* ZhiNengPPTView.m in Sources */ = {isa = PBXBuildFile; fileRef = CA0C3AB42CB5061500E01A72 /* ZhiNengPPTView.m */; };
CA0C3AB92CB51D5900E01A72 /* ZhiNengPPTCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = CA0C3AB82CB51D5900E01A72 /* ZhiNengPPTCollectionViewCell.m */; };
CA0C3ABC2CB536F800E01A72 /* FanWenListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CA0C3ABB2CB536F800E01A72 /* FanWenListViewController.m */; };
CA0D082D2CA4F8930086855E /* ShouYeZNXZTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = CA0D082C2CA4F8930086855E /* ShouYeZNXZTableViewCell.m */; };
CA0D08302CA4FBDB0086855E /* ShouYeXieZuoTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = CA0D082F2CA4FBDB0086855E /* ShouYeXieZuoTableViewCell.m */; };
CA0D08332CA4FFB90086855E /* ShouYeBannerTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = CA0D08322CA4FFB90086855E /* ShouYeBannerTableViewCell.m */; };
@ -360,6 +366,18 @@
CA0C3AA12CB4DBB900E01A72 /* DuanLuoXieZuoView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DuanLuoXieZuoView.m; sourceTree = "<group>"; };
CA0C3AA32CB4DED200E01A72 /* DuanLuoXieZuoCellView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DuanLuoXieZuoCellView.h; sourceTree = "<group>"; };
CA0C3AA42CB4DED200E01A72 /* DuanLuoXieZuoCellView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DuanLuoXieZuoCellView.m; sourceTree = "<group>"; };
CA0C3AA72CB4FE6300E01A72 /* DuanLuoXieZuoQWViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DuanLuoXieZuoQWViewController.h; sourceTree = "<group>"; };
CA0C3AA82CB4FE6300E01A72 /* DuanLuoXieZuoQWViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DuanLuoXieZuoQWViewController.m; sourceTree = "<group>"; };
CA0C3AAB2CB4FF0300E01A72 /* DuanLuoXieZuoQWView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DuanLuoXieZuoQWView.h; sourceTree = "<group>"; };
CA0C3AAC2CB4FF0300E01A72 /* DuanLuoXieZuoQWView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DuanLuoXieZuoQWView.m; sourceTree = "<group>"; };
CA0C3AAF2CB5053600E01A72 /* ZhiNengPPTViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ZhiNengPPTViewController.h; sourceTree = "<group>"; };
CA0C3AB02CB5053600E01A72 /* ZhiNengPPTViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ZhiNengPPTViewController.m; sourceTree = "<group>"; };
CA0C3AB32CB5061500E01A72 /* ZhiNengPPTView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ZhiNengPPTView.h; sourceTree = "<group>"; };
CA0C3AB42CB5061500E01A72 /* ZhiNengPPTView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ZhiNengPPTView.m; sourceTree = "<group>"; };
CA0C3AB72CB51D5900E01A72 /* ZhiNengPPTCollectionViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ZhiNengPPTCollectionViewCell.h; sourceTree = "<group>"; };
CA0C3AB82CB51D5900E01A72 /* ZhiNengPPTCollectionViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ZhiNengPPTCollectionViewCell.m; sourceTree = "<group>"; };
CA0C3ABA2CB536F800E01A72 /* FanWenListViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FanWenListViewController.h; sourceTree = "<group>"; };
CA0C3ABB2CB536F800E01A72 /* FanWenListViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FanWenListViewController.m; sourceTree = "<group>"; };
CA0D082B2CA4F8930086855E /* ShouYeZNXZTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ShouYeZNXZTableViewCell.h; sourceTree = "<group>"; };
CA0D082C2CA4F8930086855E /* ShouYeZNXZTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ShouYeZNXZTableViewCell.m; sourceTree = "<group>"; };
CA0D082E2CA4FBDB0086855E /* ShouYeXieZuoTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ShouYeXieZuoTableViewCell.h; sourceTree = "<group>"; };
@ -1104,6 +1122,7 @@
CA0C3A9B2CB4DA9A00E01A72 /* 段落 */ = {
isa = PBXGroup;
children = (
CA0C3AA62CB4FE5300E01A72 /* 续写润色 */,
CA0C3A9F2CB4DBAC00E01A72 /* view */,
CA0C3A9C2CB4DADA00E01A72 /* DuanLuoXieZuoViewController.h */,
CA0C3A9D2CB4DADA00E01A72 /* DuanLuoXieZuoViewController.m */,
@ -1122,6 +1141,54 @@
path = view;
sourceTree = "<group>";
};
CA0C3AA62CB4FE5300E01A72 /* 续写润色 */ = {
isa = PBXGroup;
children = (
CA0C3AAA2CB4FEF200E01A72 /* view */,
CA0C3AA72CB4FE6300E01A72 /* DuanLuoXieZuoQWViewController.h */,
CA0C3AA82CB4FE6300E01A72 /* DuanLuoXieZuoQWViewController.m */,
);
path = "续写润色";
sourceTree = "<group>";
};
CA0C3AAA2CB4FEF200E01A72 /* view */ = {
isa = PBXGroup;
children = (
CA0C3AAB2CB4FF0300E01A72 /* DuanLuoXieZuoQWView.h */,
CA0C3AAC2CB4FF0300E01A72 /* DuanLuoXieZuoQWView.m */,
);
path = view;
sourceTree = "<group>";
};
CA0C3AAE2CB5051800E01A72 /* 智能PPT生成 */ = {
isa = PBXGroup;
children = (
CA0C3AB62CB51D4900E01A72 /* cell */,
CA0C3AB22CB5060900E01A72 /* view */,
CA0C3AAF2CB5053600E01A72 /* ZhiNengPPTViewController.h */,
CA0C3AB02CB5053600E01A72 /* ZhiNengPPTViewController.m */,
);
path = "智能PPT生成";
sourceTree = "<group>";
};
CA0C3AB22CB5060900E01A72 /* view */ = {
isa = PBXGroup;
children = (
CA0C3AB32CB5061500E01A72 /* ZhiNengPPTView.h */,
CA0C3AB42CB5061500E01A72 /* ZhiNengPPTView.m */,
);
path = view;
sourceTree = "<group>";
};
CA0C3AB62CB51D4900E01A72 /* cell */ = {
isa = PBXGroup;
children = (
CA0C3AB72CB51D5900E01A72 /* ZhiNengPPTCollectionViewCell.h */,
CA0C3AB82CB51D5900E01A72 /* ZhiNengPPTCollectionViewCell.m */,
);
path = cell;
sourceTree = "<group>";
};
CA0D082A2CA4F8720086855E /* cell */ = {
isa = PBXGroup;
children = (
@ -1799,6 +1866,7 @@
CABA145A2C9D0AF2002CB3B1 /* 首页 */ = {
isa = PBXGroup;
children = (
CA0C3AAE2CB5051800E01A72 /* 智能PPT生成 */,
CAB0D3722CAA47CF009BF67D /* 智能写作 */,
CAA600CE2CA9470800026CF4 /* 课堂写作 */,
CA11ED7A2CA6B0BA00209DFC /* 写作分享 */,
@ -1818,6 +1886,8 @@
children = (
CABA14622C9D0B25002CB3B1 /* FanWenViewController.h */,
CABA14632C9D0B25002CB3B1 /* FanWenViewController.m */,
CA0C3ABA2CB536F800E01A72 /* FanWenListViewController.h */,
CA0C3ABB2CB536F800E01A72 /* FanWenListViewController.m */,
);
path = "范文";
sourceTree = "<group>";
@ -3166,6 +3236,7 @@
CB489DCA27449D5C00DA044A /* AppDelegate.m in Sources */,
CB489F8B2744A0BD00DA044A /* NSString+extend.m in Sources */,
CAA600D92CA95AAC00026CF4 /* KeTangXieZuoNJViewController.m in Sources */,
CA0C3AB92CB51D5900E01A72 /* ZhiNengPPTCollectionViewCell.m in Sources */,
CB489F8D2744A0BD00DA044A /* NaviGationView.m in Sources */,
CB489F9C2744A0BD00DA044A /* LogTableViewCell.m in Sources */,
CABA14B12C9D4318002CB3B1 /* UserAuthModel.m in Sources */,
@ -3192,6 +3263,7 @@
CABA14AC2C9D4318002CB3B1 /* OrderGoodsModel.m in Sources */,
CABA14EB2C9D7AB2002CB3B1 /* StartKeTangXieZuoView.m in Sources */,
CABA14642C9D0B25002CB3B1 /* FanWenViewController.m in Sources */,
CA0C3AB12CB5053600E01A72 /* ZhiNengPPTViewController.m in Sources */,
CA487D8D2CA3E6B700AE773B /* StartZNPPTDaGangSonTableViewCell.m in Sources */,
CA0D087F2CA55E5D0086855E /* JJGradientLabel.m in Sources */,
CA0D08712CA54D4B0086855E /* ShouYeLiShiJiLuXZTableViewCell.m in Sources */,
@ -3242,6 +3314,7 @@
CB489FAC2744A0BD00DA044A /* XLPhotoBrowser.m in Sources */,
CB489F522744A0BD00DA044A /* PlayAudio.m in Sources */,
CA0D08492CA534ED0086855E /* ShouYeShenFenCollectionViewCell.m in Sources */,
CA0C3AAD2CB4FF0300E01A72 /* DuanLuoXieZuoQWView.m in Sources */,
CAB0F3642CAA8523003B0C39 /* XieZuoXiangQingView.m in Sources */,
CB489F662744A0BD00DA044A /* DAYUtils.m in Sources */,
CA4257B22CA2BB8500A36A10 /* StartPayViewController.m in Sources */,
@ -3321,6 +3394,7 @@
CA487D982CA40A8300AE773B /* StartPayDaoJiShiView.m in Sources */,
CB489F642744A0BD00DA044A /* DAYNavigationBar.m in Sources */,
CBD422B928DAF2E800C32440 /* JhtBannerScrollView.m in Sources */,
CA0C3ABC2CB536F800E01A72 /* FanWenListViewController.m in Sources */,
CA0C3A8E2CB4C94000E01A72 /* HuanGeSiLuHDCollectionReusableView.m in Sources */,
CA0FD6AC2CA924A1009A4417 /* FXXieZuoJianYiView.m in Sources */,
CABA14B82C9D4318002CB3B1 /* WeixinServiceModel.m in Sources */,
@ -3370,8 +3444,10 @@
CB489F562744A0BD00DA044A /* amrFileCodec.m in Sources */,
CABA14822C9D1D0A002CB3B1 /* TextHeaderCollectionViewCell.m in Sources */,
CB489F572744A0BD00DA044A /* AudioRecored.m in Sources */,
CA0C3AA92CB4FE6300E01A72 /* DuanLuoXieZuoQWViewController.m in Sources */,
CA0D083D2CA50F480086855E /* ShouYeZuoWenTableViewCell.m in Sources */,
CA8181B32C9EB96F00EE7E6E /* StartKTXZPGDetailXZView.m in Sources */,
CA0C3AB52CB5061500E01A72 /* ZhiNengPPTView.m in Sources */,
CAB0F35C2CAA7664003B0C39 /* ChuangZuoSiLuView.m in Sources */,
CA0D084C2CA538710086855E /* ShouYeShenFenNianJiView.m in Sources */,
);

View File

@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "bg@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "bg@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 426 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 907 KiB

View File

@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "容器@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "容器@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "容器 29@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "容器 29@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 485 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1006 B

View File

@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "矩形 18114@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "矩形 18114@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "组 43019@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "组 43019@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 377 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 632 B

View File

@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "容器@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "容器@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 508 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 854 B

View File

@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "圆形 350@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "圆形 350@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 984 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "组 43004@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "组 43004@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 771 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "组 43495@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "组 43495@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 727 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "组 43495@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "组 43495@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 728 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -39,7 +39,7 @@
normalTitleColor:RGBCOLOR(216, 216, 216)];
[self.rootVcAry addObject:honeVC];
AIChatViewController *fanwenVC =[[AIChatViewController alloc] init];
FanWenViewController *fanwenVC =[[FanWenViewController alloc] init];
[self setTabBarItem:fanwenVC.tabBarItem
title:@"范文"
titleSize:12.0
@ -50,7 +50,7 @@
normalTitleColor:RGBCOLOR(216, 216, 216)];
[self.rootVcAry addObject:fanwenVC];
FanWenViewController *aiVC =[[FanWenViewController alloc] init];
AIChatViewController *aiVC =[[AIChatViewController alloc] init];
[self setTabBarItem:aiVC.tabBarItem
title:@""
titleSize:12.0

View File

@ -28,6 +28,8 @@ typedef void(^ExtraBtnOnClick)(UIButton *extraBtn);
// 滚动条
@property (strong, nonatomic) UIView *scrollLine;
// 滚动圆点
@property (strong, nonatomic) UIView *scrollPoint;
- (instancetype)initWithFrame:(CGRect )frame segmentStyle:(ZJSegmentStyle *)segmentStyle delegate:(id<ZJScrollPageViewDelegate>)delegate titles:(NSArray *)titles titleDidClick:(TitleBtnOnClickBlock)titleDidClick;

View File

@ -93,7 +93,9 @@ static CGFloat const contentSizeXOff = 20.0;
if (self.segmentStyle.isShowLine) {
[self.scrollView addSubview:self.scrollLine];
}
if (self.segmentStyle.showPoint) {
[self.scrollView addSubview:self.scrollPoint];
}
if (self.segmentStyle.isShowCover) {
[self.scrollView insertSubview:self.coverLayer atIndex:0];
@ -303,7 +305,21 @@ static CGFloat const contentSizeXOff = 20.0;
}
if(self.scrollPoint)
{
if (self.segmentStyle.isScrollTitle) {
self.scrollPoint.frame = CGRectMake(coverX+coverW-9 , self.zj_height /2.0-16, 14 , 14);
} else {
if (self.segmentStyle.isAdjustCoverOrLineWidth) {
coverW = [self.titleWidths[_currentIndex] floatValue] + wGap;
coverX = (firstLabel.zj_width - coverW) * 0.5;
}
self.scrollPoint.frame = CGRectMake(coverX+coverW-9 , self.zj_height /2.0-16, 14 , 14);
}
}
if (self.coverLayer) {
if (self.segmentStyle.isScrollTitle) {
@ -365,6 +381,20 @@ static CGFloat const contentSizeXOff = 20.0;
}
}
if(weakSelf.scrollPoint)
{
if (weakSelf.segmentStyle.isScrollTitle) {
weakSelf.scrollPoint.zj_x = currentTitleView.zj_x+currentTitleView.zj_width-9;
} else {
if (self.segmentStyle.isAdjustCoverOrLineWidth) {
CGFloat scrollLineW = [self.titleWidths[_currentIndex] floatValue] + wGap;
CGFloat scrollLineX = currentTitleView.zj_x + (currentTitleView.zj_width - scrollLineW) * 0.5;
weakSelf.scrollPoint.zj_x = scrollLineX+currentTitleView.zj_width-9;
} else {
weakSelf.scrollPoint.zj_x = currentTitleView.zj_x+currentTitleView.zj_width-9;
}
}
}
if (weakSelf.coverLayer) {
if (weakSelf.segmentStyle.isScrollTitle) {
@ -436,6 +466,25 @@ static CGFloat const contentSizeXOff = 20.0;
}
}
if(self.scrollPoint)
{
if (self.segmentStyle.isScrollTitle) {
self.scrollPoint.zj_x = oldTitleView.zj_x + xDistance * progress +currentTitleView.zj_width-9;
} else {
if (self.segmentStyle.isAdjustCoverOrLineWidth) {
CGFloat oldScrollLineW = [self.titleWidths[oldIndex] floatValue] + wGap;
CGFloat currentScrollLineW = [self.titleWidths[currentIndex] floatValue] + wGap;
wDistance = currentScrollLineW - oldScrollLineW;
CGFloat oldScrollLineX = oldTitleView.zj_x + (oldTitleView.zj_width - oldScrollLineW) * 0.5;
CGFloat currentScrollLineX = currentTitleView.zj_x + (currentTitleView.zj_width - currentScrollLineW) * 0.5;
xDistance = currentScrollLineX - oldScrollLineX;
self.scrollPoint.zj_x = oldScrollLineX + xDistance * progress+currentTitleView.zj_width-9;
} else {
self.scrollPoint.zj_x = oldTitleView.zj_x + xDistance * progress+currentTitleView.zj_width-9;
}
}
}
if (self.coverLayer) {
if (self.segmentStyle.isScrollTitle) {
@ -609,6 +658,30 @@ static CGFloat const contentSizeXOff = 20.0;
return _scrollLine;
}
-(UIView *)scrollPoint
{
if (!self.segmentStyle.showPoint) {
return nil;
}
if (!_scrollPoint) {
UIView *lineView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 14, 14)];
lineView.layer.cornerRadius = 7;
lineView.layer.masksToBounds = YES;
CAGradientLayer *layer = [CAGradientLayer layer];
layer.startPoint = CGPointMake(0, 0);
layer.endPoint = CGPointMake(1, 1);
layer.colors = @[(id)RGBCOLOR(42, 211, 237).CGColor,(id)RGBCOLOR(148, 127, 255).CGColor];
layer.frame = lineView.layer.bounds;
[lineView.layer insertSublayer:layer atIndex:0];
_scrollPoint = lineView;
}
return _scrollPoint;
}
- (UIView *)coverLayer {
if (!self.segmentStyle.isShowCover) {
return nil;

View File

@ -34,6 +34,8 @@ typedef NS_OPTIONS(NSInteger, SegmentViewComponent) {
@property (assign, nonatomic, getter=isShowCover) BOOL showCover;
/** 是否显示滚动条 默认为NO*/
@property (assign, nonatomic, getter=isShowLine) BOOL showLine;
/** 是否显示滚动圆点 默认为NO*/
@property (assign, nonatomic) BOOL showPoint;
/** 是否显示图片 默认为NO*/
@property (assign, nonatomic, getter=isShowImage) BOOL showImage;
/** 是否显示附加的按钮 默认为NO*/

View File

@ -239,6 +239,7 @@
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[StartZNPPTHUDAlter dismis];
StartZNPPTDaGangViewController *vc = [StartZNPPTDaGangViewController new];
vc.isyindao = YES;
[self.viewController.navigationController pushViewController:vc animated:YES];
});
}

View File

@ -10,7 +10,7 @@
NS_ASSUME_NONNULL_BEGIN
@interface StartZNPPTDaGangViewController : BaseViewController
@property (nonatomic , assign) BOOL isyindao;
@end
NS_ASSUME_NONNULL_END

View File

@ -35,7 +35,7 @@
make.left.right.bottom.equalTo(self.view);
make.top.offset(NavHeight);
}];
view.isyindao = self.isyindao;
}
@end

View File

@ -9,7 +9,7 @@
@interface StartZNPPTDaGangSonTableViewCell ()
///
@property (nonatomic , strong) UILabel *lbname;
@property (nonatomic , strong) UITextField *fieldname;
///
@property (nonatomic , strong) UIButton *btedit;
@ -49,24 +49,25 @@
[viewpoint.layer setBorderWidth:1];
[viewpoint.layer setBorderColor:RGBCOLOR(191, 199, 214).CGColor];
UILabel *lbname = [[UILabel alloc] init];
[lbname setText:@"重大项目进展"];
[lbname setTextColor:RGBCOLOR(26, 26, 26)];
[lbname setTextAlignment:NSTextAlignmentLeft];
[lbname setFont:[UIFont systemFontOfSize:14]];
[viewback addSubview:lbname];
[lbname mas_makeConstraints:^(MASConstraintMaker *make) {
UITextField *fieldname = [[UITextField alloc] init];
[fieldname setText:@"重大项目进展"];
[fieldname setTextColor:RGBCOLOR(26, 26, 26)];
[fieldname setTextAlignment:NSTextAlignmentLeft];
[fieldname setFont:[UIFont systemFontOfSize:14]];
[viewback addSubview:fieldname];
[fieldname mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(viewpoint.mas_right).offset(10);
make.centerY.equalTo(viewpoint);
make.right.equalTo(viewback).offset(-70);
}];
_lbname = lbname;
[fieldname setUserInteractionEnabled:NO];
_fieldname = fieldname;
UIView *viewpx = [[UIView alloc] init];
[viewpx setTag:-1];
[viewback addSubview:viewpx];
[viewpx mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.equalTo(lbname);
make.centerY.equalTo(fieldname);
make.right.equalTo(viewback);
make.height.offset(30);
make.width.offset(35);

View File

@ -19,7 +19,7 @@
///
@property (nonatomic , strong) UIView *viewline ;
///
@property (nonatomic , strong) UILabel *lbtitle;
@property (nonatomic , strong) UITextField *fieldtitle;
///
@property (nonatomic , strong) UIImageView *btpx;
///
@ -82,19 +82,19 @@
}];
_viewline = viewline;
UILabel *lbtitle = [[UILabel alloc] init];
[lbtitle setText:@"年终总结报告"];
[lbtitle setTextColor:RGBCOLOR(26, 26, 26)];
[lbtitle setTextAlignment:NSTextAlignmentLeft];
[lbtitle setFont:[UIFont boldSystemFontOfSize:15]];
[lbtitle setNumberOfLines:2];
[viewback addSubview:lbtitle];
[lbtitle mas_makeConstraints:^(MASConstraintMaker *make) {
UITextField *fieldtitle = [[UITextField alloc] init];
[fieldtitle setText:@"年终总结报告"];
[fieldtitle setTextColor:RGBCOLOR(26, 26, 26)];
[fieldtitle setTextAlignment:NSTextAlignmentLeft];
[fieldtitle setFont:[UIFont boldSystemFontOfSize:15]];
[viewback addSubview:fieldtitle];
[fieldtitle mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(viewpoint.mas_right).offset(10);
make.centerY.equalTo(viewpoint);
make.right.equalTo(viewback).offset(-70);
}];
_lbtitle = lbtitle;
[fieldtitle setUserInteractionEnabled:NO];
_fieldtitle = fieldtitle;
UIView *viewpx = [[UIView alloc] init];
[viewpx setTag:-1];

View File

@ -10,7 +10,7 @@
NS_ASSUME_NONNULL_BEGIN
@interface StartZNPPTDaGangView : UIView
@property (nonatomic , assign) BOOL isyindao;
@end
NS_ASSUME_NONNULL_END

View File

@ -119,6 +119,7 @@
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[StartZNPPTDaGangAlterView dismis];
StartZNPPTYuLanViewController *vc = [StartZNPPTYuLanViewController new];
vc.isyindao = self.isyindao;
[self.viewController.navigationController pushViewController:vc animated:YES];
});
}
@ -154,6 +155,10 @@
}];
}
#pragma mark - UITableView
-(void)scrollViewDidScroll:(UIScrollView *)scrollView
{
[self endEditing:YES];
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
if(tableView.tag==1)return self.arrContent.count;

View File

@ -10,7 +10,7 @@
NS_ASSUME_NONNULL_BEGIN
@interface StartZNPPTYuLanViewController : BaseViewController
@property (nonatomic , assign) BOOL isyindao;
@end
NS_ASSUME_NONNULL_END

View File

@ -58,8 +58,15 @@
make.bottom.equalTo(self.navigationView).offset(-12);
}];
UIButton *btcreate = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 121, 34)];
[btcreate setTitle:@"生成自己的PPT" forState:UIControlStateNormal];
NSString *strtt = @"下载PPT";
float f_width = 79;
if(self.isyindao)
{
strtt = @"生成自己的PPT";
f_width = 121;
}
UIButton *btcreate = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, f_width, 34)];
[btcreate setTitle:strtt forState:UIControlStateNormal];
[btcreate setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[btcreate.titleLabel setFont:[UIFont systemFontOfSize:14]];
[btcreate.layer setMasksToBounds:YES];
@ -68,7 +75,7 @@
[btcreate mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(self.navigationView).offset(-17);
make.centerY.equalTo(lbname);
make.size.sizeOffset(CGSizeMake(121, 34));
make.size.sizeOffset(CGSizeMake(f_width, 34));
}];
[btcreate addTarget:self action:@selector(createAction) forControlEvents:UIControlEventTouchUpInside];
[Tools changedView:btcreate colors:MainJBColors startPoint:CGPointMake(0, 0) endPoint:CGPointMake(1, 0)];

View File

@ -0,0 +1,16 @@
//
// FanWenListViewController.h
// ProductApp
//
// Created by 工作 on 2024/10/8.
//
#import <UIKit/UIKit.h>
#import "ZJScrollPageView.h"
NS_ASSUME_NONNULL_BEGIN
@interface FanWenListViewController : UIViewController<ZJScrollPageViewChildVcDelegate>
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,25 @@
//
// FanWenListViewController.m
// ProductApp
//
// Created by on 2024/10/8.
//
#import "FanWenListViewController.h"
@interface FanWenListViewController ()
@end
@implementation FanWenListViewController
- (void)viewDidLoad {
[super viewDidLoad];
[self.view setBackgroundColor:[UIColor clearColor]];
}
@end

View File

@ -6,26 +6,127 @@
//
#import "FanWenViewController.h"
#import "ZJScrollPageView.h"
#import "FanWenListViewController.h"
@interface FanWenViewController ()
@interface FanWenViewController ()<ZJScrollPageViewDelegate>
///
@property (nonatomic , strong) ZJScrollPageView *scrollPageView;
@end
@implementation FanWenViewController
-(UIStatusBarStyle)preferredStatusBarStyle {
return UIStatusBarStyleDefault;
}
-(void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
}
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
[self.navigationController setNavigationBarHidden:YES animated:NO];
[self showNaviGationView:YES];
[self.navigationView setTitle:@"" titleColor:RGBCOLOR(60, 60, 60)];
[self.navigationView setBackgroundColor:[UIColor clearColor]];
UIImageView *imgvback = [[UIImageView alloc] init];
[imgvback setImage:[UIImage imageNamed:@"fanwen_bg"]];
[self.view addSubview:imgvback];
[imgvback mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.top.right.equalTo(self.view);
}];
[self.view sendSubviewToBack:imgvback];
UIView *viewsearch = [[UIView alloc] init];
[self.view addSubview:viewsearch];
[viewsearch mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.offset(20);
make.right.equalTo(self.view).offset(-20);
make.top.offset(KMagrinTop+20);
make.height.offset(50);
}];
[self drawSearchView:viewsearch];
ZJSegmentStyle *style = [[ZJSegmentStyle alloc] init];
//
style.showLine = NO;
style.scaleTitle = YES;
style.showPoint = YES;
style.normalTitleColor = RGBCOLOR(61, 61, 61);
style.selectedTitleColor = RGBCOLOR(51, 51, 51);
style.titleFont = [UIFont systemFontOfSize:14];
style.titleMargin = 34;
style.titleBigScale = 1.2;
style.autoAdjustTitlesWidth = NO;
style.adjustCoverOrLineWidth = NO;
ZJScrollPageView *scrollPageView = [[ZJScrollPageView alloc] initWithFrame:CGRectMake(0, KMagrinTop+75, UISCREEN_WIDTH, UISCREEN_HEIGHT - KMagrinTop-TabHeight-75) segmentStyle:style titles:@[@"全部",@"写给自己",@"检讨书",@"中考作文",@"青春",@"中考作文",@"检讨书",@"写给自己",@"青春",@"检讨书"] parentViewController:self delegate:self];
[self.view addSubview:scrollPageView];
scrollPageView.segmentView.backgroundColor = [UIColor clearColor];
scrollPageView.contentView.backgroundColor = [UIColor clearColor];
scrollPageView.contentView.collectionView.backgroundColor = [UIColor clearColor];
_scrollPageView = scrollPageView;
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
-(void)drawSearchView:(UIView *)view
{
[view.layer setMasksToBounds:YES];
[view.layer setCornerRadius:16];
[view.layer setBorderWidth:1];
[view.layer setBorderColor:RGBCOLOR(61, 61, 61).CGColor];
UITextField *field = [[UITextField alloc] init];
[field setTextColor:RGBCOLOR(51, 51, 51)];
[field setTextAlignment:NSTextAlignmentLeft];
[field setFont:[UIFont systemFontOfSize:14]];
[view addSubview:field];
[field mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.offset(20);
make.top.bottom.equalTo(view);
make.right.equalTo(view).offset(-50);
}];
NSString *strplatch = @"请输入文章标题或者关键词";
[field setAttributedPlaceholder:[Tools arrstring:strplatch andstart:0 andend:(int)strplatch.length andfont:[UIFont systemFontOfSize:14] andcolor:RGBCOLOR(51, 51, 51)]];
UIButton *btsearch = [[UIButton alloc] init];
[btsearch setImage:[UIImage imageNamed:@"fanwen_search"] forState:UIControlStateNormal];
[view addSubview:btsearch];
[btsearch mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.bottom.right.equalTo(view);
make.width.offset(50);
}];
[btsearch addTarget:self action:@selector(searchAction) forControlEvents:UIControlEventTouchUpInside];
}
*/
-(void)searchAction
{
}
#pragma mark - custom delegate - delegate
- (NSInteger)numberOfChildViewControllers {
return 10;
}
- (UIViewController<ZJScrollPageViewChildVcDelegate> *)childViewController:(UIViewController<ZJScrollPageViewChildVcDelegate> *)reuseViewController forIndex:(NSInteger)index {
FanWenListViewController<ZJScrollPageViewChildVcDelegate> *childVC = (FanWenListViewController *)reuseViewController;
if (!childVC) {
childVC = [[FanWenListViewController alloc] init];
}
return childVC;
}
- (void)scrollPageController:(UIViewController *)scrollPageController childViewControllDidAppear:(UIViewController *)childViewController forIndex:(NSInteger)index
{
}
- (BOOL)shouldAutomaticallyForwardAppearanceMethods {
return NO;
}
@end

View File

@ -6,6 +6,7 @@
//
#import "ShouYeZCPPTTableViewCell.h"
#import "ZhiNengPPTViewController.h"
@interface ShouYeZCPPTTableViewCell ()
@ -23,6 +24,7 @@
[viewback mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self);
}];
[viewback setUserInteractionEnabled:YES];
[viewback.layer setMasksToBounds:YES];
[viewback.layer setCornerRadius:8];
[viewback setImage:[UIImage imageNamed:@"home_zc_ppt"]];
@ -72,9 +74,18 @@
make.top.offset(11);
make.right.equalTo(viewback).offset(-18);
}];
UIButton *btnext = [[UIButton alloc] init];
[viewback addSubview:btnext];
[btnext mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(viewback);
}];
[btnext addTarget:self action:@selector(nextAction) forControlEvents:UIControlEventTouchUpInside];
}
return self;
}
-(void)nextAction
{
ZhiNengPPTViewController *vc = [ZhiNengPPTViewController new];
[self.viewController.navigationController pushViewController:vc animated:YES];
}
@end

View File

@ -0,0 +1,16 @@
//
// ZhiNengPPTViewController.h
// ProductApp
//
// Created by 工作 on 2024/10/8.
//
#import "BaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface ZhiNengPPTViewController : BaseViewController
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,50 @@
//
// ZhiNengPPTViewController.m
// ProductApp
//
// Created by on 2024/10/8.
//
#import "ZhiNengPPTViewController.h"
#import "ZhiNengPPTView.h"
@interface ZhiNengPPTViewController ()
@end
@implementation ZhiNengPPTViewController
- (UIStatusBarStyle)preferredStatusBarStyle {
return UIStatusBarStyleDefault;
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:YES animated:animated];
[self showNaviGationView:YES];
[self.navigationView setTitle:@"智能PPT生成" titleColor:RGBCOLOR(60, 60, 60)];
[self.navigationView setBackgroundColor:[UIColor clearColor]];
}
- (void)viewDidLoad {
[super viewDidLoad];
[self.view setBackgroundColor:RGBCOLOR(246, 249, 250)];
UIImageView *imgvback = [[UIImageView alloc] init];
[imgvback setImage:[UIImage imageNamed:@"yd_pptBack"]];
[self.view addSubview:imgvback];
[imgvback mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.equalTo(self.view);
}];
[self.view sendSubviewToBack:imgvback];
ZhiNengPPTView *view =[[ZhiNengPPTView alloc] init];
[self.view addSubview:view];
[view mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.bottom.equalTo(self.view);
make.top.offset(NavHeight);
}];
}
@end

View File

@ -0,0 +1,16 @@
//
// ZhiNengPPTCollectionViewCell.h
// ProductApp
//
// Created by 工作 on 2024/10/8.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface ZhiNengPPTCollectionViewCell : UICollectionViewCell
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,57 @@
//
// ZhiNengPPTCollectionViewCell.m
// ProductApp
//
// Created by on 2024/10/8.
//
#import "ZhiNengPPTCollectionViewCell.h"
@implementation ZhiNengPPTCollectionViewCell
-(id)initWithFrame:(CGRect)frame
{
if(self = [super initWithFrame:frame])
{
UIView *viewback = [[UIView alloc] init];
[self.contentView addSubview:viewback];
[viewback mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self);
}];
UIImageView *imgvback = [[UIImageView alloc] init];
[imgvback setImage:[UIImage imageNamed:@"home_ls_znxz"]];
[viewback addSubview:imgvback];
[imgvback mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.equalTo(viewback);
make.bottom.equalTo(viewback).offset(-30);
}];
[imgvback setContentMode:UIViewContentModeScaleAspectFill];
[imgvback.layer setMasksToBounds:YES];
[imgvback.layer setCornerRadius:4];
UILabel *lbname = [[UILabel alloc] init];
[lbname setText:@"企业工作汇报"];
[lbname setTextColor:RGBCOLOR(26, 26, 26)];
[lbname setTextAlignment:NSTextAlignmentCenter];
[lbname setFont:[UIFont systemFontOfSize:12]];
[viewback addSubview:lbname];
[lbname mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.equalTo(viewback);
make.top.equalTo(imgvback.mas_bottom).offset(10);
}];
UIButton *btselect = [[UIButton alloc] init];
[btselect setImage:[UIImage imageNamed:@"ppt_fengeN"] forState:UIControlStateNormal];
[btselect setImage:[UIImage imageNamed:@"ppt_fengeY"] forState:UIControlStateSelected];
[viewback addSubview:btselect];
[btselect mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.top.equalTo(viewback);
make.width.height.offset(30);
}];
[btselect setUserInteractionEnabled:NO];
}
return self;
}
@end

View File

@ -0,0 +1,16 @@
//
// ZhiNengPPTView.h
// ProductApp
//
// Created by 工作 on 2024/10/8.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface ZhiNengPPTView : UIView
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,426 @@
//
// ZhiNengPPTView.m
// ProductApp
//
// Created by on 2024/10/8.
//
#import "ZhiNengPPTView.h"
#import "FSTextView.h"
#import "ZhiNengPPTCollectionViewCell.h"
#import "StartZNPPTHUDAlter.h"
#import "StartZNPPTDaGangViewController.h"
@interface ZhiNengPPTView ()<UICollectionViewDelegate,UICollectionViewDataSource>
///
@property (nonatomic , strong) UIView *viewtext;
@property (nonatomic , strong) UIView *viewfile;
@end
@implementation ZhiNengPPTView
-(id)initWithFrame:(CGRect)frame
{
if(self = [super initWithFrame:frame])
{
UIScrollView *scvback = [[UIScrollView alloc] init];
[scvback setShowsVerticalScrollIndicator:NO];
[self addSubview:scvback];
[scvback mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.top.offset(0);
make.width.equalTo(self);
make.height.equalTo(self).offset(-TabHeight-40);
}];
UIView *viewback = [[UIView alloc] init];
[viewback setBackgroundColor:[UIColor whiteColor]];
[scvback addSubview:viewback];
[viewback mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.offset(16);
make.width.equalTo(scvback).offset(-32);
make.top.offset(14);
}];
[viewback.layer setMasksToBounds:YES];
[viewback.layer setCornerRadius:8];
[self drawInfoview:viewback];
UILabel *lbname = [[UILabel alloc] init];
[lbname setText:@"PPT风格"];
[lbname setTextColor:RGBCOLOR(26, 26, 26)];
[lbname setTextAlignment:NSTextAlignmentLeft];
[lbname setFont:[UIFont systemFontOfSize:15]];
[scvback addSubview:lbname];
[lbname mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(viewback);
make.top.equalTo(viewback.mas_bottom).offset(20);
}];
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
layout.minimumLineSpacing = 0;
layout.minimumInteritemSpacing = 0;
UICollectionView *collect = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
[collect setScrollEnabled:NO];
[collect setDelegate:self];
[collect setDataSource:self];
[collect setBackgroundColor:[UIColor clearColor]];
[scvback addSubview:collect];
[collect mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.equalTo(viewback);
make.top.equalTo(lbname.mas_bottom).offset(12);
make.height.offset(((UISCREEN_WIDTH-42)/2.0*270/458+30+10)*3);
}];
[collect registerClass:[ZhiNengPPTCollectionViewCell class] forCellWithReuseIdentifier:@"ZhiNengPPTCollectionViewCell"];
[scvback mas_makeConstraints:^(MASConstraintMaker *make) {
make.bottom.equalTo(collect).offset(30);
}];
UIView *viewbottom = [[UIView alloc] init];
[viewbottom setBackgroundColor:[UIColor whiteColor]];
[self addSubview:viewbottom];
[viewbottom mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.bottom.equalTo(self);
make.top.equalTo(scvback.mas_bottom);
}];
UIButton *btshengcheng = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, UISCREEN_WIDTH-32, 44)];
[btshengcheng setTitle:@"确定生成PPT" forState:UIControlStateNormal];
[btshengcheng setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[btshengcheng.titleLabel setFont:[UIFont boldSystemFontOfSize:16]];
[btshengcheng.layer setMasksToBounds:YES];
[btshengcheng.layer setCornerRadius:8];
[viewbottom addSubview:btshengcheng];
[btshengcheng mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.offset(16);
make.top.offset(10);
make.right.equalTo(viewbottom).offset(-16);
make.height.offset(44);
}];
[btshengcheng addTarget:self action:@selector(shengchengAction) forControlEvents:UIControlEventTouchUpInside];
[Tools changedView:btshengcheng colors:MainJBColors startPoint:CGPointMake(0, 0) endPoint:CGPointMake(1, 0)];
}
return self;
}
-(void)drawInfoview:(UIView *)view
{
UILabel *lbname = [[UILabel alloc] init];
[lbname setText:@"*开始创作"];
[lbname setTextColor:RGBCOLOR(51, 51, 51)];
[lbname setTextAlignment:NSTextAlignmentLeft];
[lbname setFont:[UIFont boldSystemFontOfSize:15]];
[view addSubview:lbname];
[lbname mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.offset(12);
make.top.offset(16);
}];
lbname.attributedText = [Tools arrstring:lbname.text andstart:0 andend:1 andfont:[UIFont boldSystemFontOfSize:15] andcolor:RGBCOLOR(255, 78, 74)];
FSTextView *textview = [[FSTextView alloc] init];
[textview setTextColor:RGBCOLOR(51, 51, 51)];
[textview setTextAlignment:NSTextAlignmentLeft];
[textview setFont:[UIFont systemFontOfSize:14]];
[textview.layer setMasksToBounds:YES];
[textview.layer setCornerRadius:8];
[textview setBackgroundColor:RGBCOLOR(246, 249, 250)];
[textview setPlaceholder:@"请输入主题"];
[view addSubview:textview];
[textview mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.offset(12);
make.right.equalTo(view).offset(-12);
make.top.equalTo(lbname.mas_bottom).offset(13);
make.height.offset(110);
}];
[textview setMaxLength:100];
UILabel *lbnumber = [[UILabel alloc] init];
[lbnumber setText:@"0/100"];
[lbnumber setTextColor:RGBCOLOR(102, 102, 102)];
[lbnumber setTextAlignment:NSTextAlignmentLeft];
[lbnumber setFont:[UIFont systemFontOfSize:10]];
[view addSubview:lbnumber];
[lbnumber mas_makeConstraints:^(MASConstraintMaker *make) {
make.bottom.right.equalTo(textview).offset(-8);
}];
[textview addTextDidChangeHandler:^(FSTextView *textView) {
lbnumber.text = [NSString stringWithFormat:@"%ld/100",textView.text.length];
}];
UIButton *btyuyan = [[UIButton alloc] init];
[btyuyan setTitle:@"中文(简体)" forState:UIControlStateNormal];
[btyuyan setTitleColor:RGBCOLOR(153, 153, 153) forState:UIControlStateNormal];
[btyuyan.titleLabel setFont:[UIFont systemFontOfSize:13]];
[btyuyan.layer setMasksToBounds:YES];
[btyuyan.layer setCornerRadius:4];
[btyuyan.layer setBorderWidth:1];
[btyuyan.layer setBorderColor:RGBCOLOR(222, 222, 222).CGColor];
[btyuyan setImage:[UIImage imageNamed:@"down_next"] forState:UIControlStateNormal];
[view addSubview:btyuyan];
[btyuyan mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(textview);
make.top.equalTo(textview.mas_bottom).offset(12);
make.width.offset(91);
make.height.offset(24);
}];
[btyuyan setIconInRightWithSpacing:2];
[btyuyan addTarget:self action:@selector(yuyanAction:) forControlEvents:UIControlEventTouchUpInside];
NSArray *arr = @[@"演讲备注",@"智能配图"];
for(int i = 0 ; i < 2; i++)
{
UIButton *bttype = [[UIButton alloc] init];
[bttype setTitle:arr[i] forState:UIControlStateNormal];
[bttype setTitleColor:RGBCOLOR(153, 153, 153) forState:UIControlStateNormal];
[bttype.titleLabel setFont:[UIFont systemFontOfSize:13]];
[bttype setImage:[UIImage imageNamed:@"ppt_type_selectN"] forState:UIControlStateNormal];
[bttype setImage:[UIImage imageNamed:@"ppt_type_selectY"] forState:UIControlStateSelected];
[view addSubview:bttype];
[bttype mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(btyuyan.mas_right).offset(10+95*i);
make.centerY.equalTo(btyuyan);
make.width.offset(85);
make.height.offset(30);
}];
[bttype setIconInRightWithSpacing:2];
[bttype setTag:i];
[bttype addTarget:self action:@selector(typeAction:) forControlEvents:UIControlEventTouchUpInside];
}
UIView *viewline = [[UIView alloc] init];
[viewline setBackgroundColor:RGBCOLOR(238, 238, 238)];
[view addSubview:viewline];
[viewline mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.equalTo(textview);
make.top.equalTo(btyuyan.mas_bottom).offset(20);
make.height.offset(1);
}];
UILabel *lbbc = [[UILabel alloc] init];
[lbbc setText:@"补充"];
[lbbc setTextColor:RGBCOLOR(51, 51, 51)];
[lbbc setTextAlignment:NSTextAlignmentLeft];
[lbbc setFont:[UIFont boldSystemFontOfSize:15]];
[view addSubview:lbbc];
[lbbc mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(viewline);
make.top.equalTo(viewline.mas_bottom).offset(16);
}];
UIButton *btchange = [[UIButton alloc] init];
[btchange setTitle:@"切换成文档" forState:UIControlStateNormal];
[btchange setTitle:@"切换成文本" forState:UIControlStateSelected];
[btchange setTitleColor:RGBCOLOR(26, 26, 26) forState:UIControlStateNormal];
[btchange.titleLabel setFont:[UIFont systemFontOfSize:12]];
[btchange setImage:[UIImage imageNamed:@"ppt_change_buchong"] forState:UIControlStateNormal];
[view addSubview:btchange];
[btchange mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(viewline);
make.centerY.equalTo(lbbc);
make.height.offset(30);
make.width.offset(80);
}];
[btchange setIconInLeftWithSpacing:2];
[btchange addTarget:self action:@selector(changeAction:) forControlEvents:UIControlEventTouchUpInside];
UIView *viewtext = [[UIView alloc] init];
[view addSubview:viewtext];
[viewtext mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.offset(12);
make.top.equalTo(lbbc.mas_bottom).offset(13);
make.right.equalTo(view).offset(-12);
make.height.offset(146);
}];
[self drawTextView:viewtext];
_viewtext = viewtext;
UIView *viewfile = [[UIView alloc] init];
[view addSubview:viewfile];
[viewfile mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.offset(12);
make.top.equalTo(lbbc.mas_bottom).offset(13);
make.right.equalTo(view).offset(-12);
make.height.offset(146);
}];
[viewfile setHidden:YES];
[self drawFileView:viewfile];
_viewfile = viewfile;
[view mas_makeConstraints:^(MASConstraintMaker *make) {
make.bottom.equalTo(viewtext).offset(12);
}];
}
-(void)drawFileView:(UIView *)view
{
UIView *viewfile = [[UIView alloc] init];
[viewfile setBackgroundColor:RGBCOLOR(246, 249, 250)];
[viewfile.layer setMasksToBounds:YES];
[viewfile.layer setCornerRadius:4];
[view addSubview:viewfile];
[viewfile mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.height.offset(86);
make.centerX.equalTo(view);
make.top.offset(7);
}];
UIView *viewfileson = [[UIView alloc] init];
[viewfile addSubview:viewfileson];
[viewfileson mas_makeConstraints:^(MASConstraintMaker *make) {
make.center.equalTo(viewfile);
make.left.offset(10);
make.right.equalTo(viewfile).offset(-10);
}];
UIImageView *imgvico= [[UIImageView alloc] init];
[imgvico setImage:[UIImage imageNamed:@"yd_txt"]];
[imgvico setContentMode:UIViewContentModeScaleAspectFit];
[viewfileson addSubview:imgvico];
[imgvico mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(viewfileson);
make.width.height.offset(33);
make.top.offset(0);
}];
UILabel *lbfilename = [[UILabel alloc] init];
[lbfilename setText:@"年终总结手稿.txt"];
[lbfilename setTextColor:RGBCOLOR(51, 51, 51)];
[lbfilename setTextAlignment:NSTextAlignmentCenter];
[lbfilename setFont:[UIFont systemFontOfSize:11]];
[lbfilename setNumberOfLines:2];
[viewfileson addSubview:lbfilename];
[lbfilename mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.equalTo(viewfileson);
make.top.equalTo(imgvico.mas_bottom).offset(4);
}];
[viewfileson mas_makeConstraints:^(MASConstraintMaker *make) {
make.bottom.equalTo(lbfilename);
}];
UIButton *btfile = [[UIButton alloc] init];
[viewfile addSubview:btfile];
[btfile mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(viewfile);
}];
[btfile addTarget:self action:@selector(fileAction) forControlEvents:UIControlEventTouchUpInside];
UILabel *lbts = [[UILabel alloc] init];
[lbts setText:@"支持pdf不支持扫描件、doc、docx、txt文件大小不得超过10MB"];
[lbts setTextColor:RGBCOLOR(153, 153, 153)];
[lbts setTextAlignment:NSTextAlignmentCenter];
[lbts setFont:[UIFont systemFontOfSize:12]];
[lbts setNumberOfLines:0];
[view addSubview:lbts];
[lbts mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(view);
make.top.equalTo(viewfile.mas_bottom).offset(12);
make.left.offset(40);
make.right.equalTo(view).offset(-40);
}];
}
-(void)drawTextView:(UIView *)view
{
FSTextView *textview = [[FSTextView alloc] init];
[textview setTextColor:RGBCOLOR(51, 51, 51)];
[textview setTextAlignment:NSTextAlignmentLeft];
[textview setFont:[UIFont systemFontOfSize:14]];
[textview.layer setMasksToBounds:YES];
[textview.layer setCornerRadius:8];
[textview setBackgroundColor:RGBCOLOR(246, 249, 250)];
[textview setPlaceholder:@"请输入内容"];
[view addSubview:textview];
[textview mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(view);
}];
[textview setMaxLength:1000];
UILabel *lbnumber = [[UILabel alloc] init];
[lbnumber setText:@"0/1000"];
[lbnumber setTextColor:RGBCOLOR(102, 102, 102)];
[lbnumber setTextAlignment:NSTextAlignmentLeft];
[lbnumber setFont:[UIFont systemFontOfSize:10]];
[view addSubview:lbnumber];
[lbnumber mas_makeConstraints:^(MASConstraintMaker *make) {
make.bottom.right.equalTo(textview).offset(-8);
}];
[textview addTextDidChangeHandler:^(FSTextView *textView) {
lbnumber.text = [NSString stringWithFormat:@"%ld/1000",textView.text.length];
}];
}
///
-(void)yuyanAction:(UIButton *)sender
{
}
//
-(void)typeAction:(UIButton *)sender
{
sender.selected = !sender.selected;
}
-(void)changeAction:(UIButton *)sender
{
sender.selected = !sender.selected;
[self.viewfile setHidden:!sender.selected];
[self.viewtext setHidden:sender.selected];
}
///
-(void)fileAction
{
}
///
-(void)shengchengAction
{
[StartZNPPTHUDAlter show];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[StartZNPPTHUDAlter dismis];
StartZNPPTDaGangViewController *vc = [StartZNPPTDaGangViewController new];
[self.viewController.navigationController pushViewController:vc animated:YES];
});
}
#pragma mark - UICollectionView
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
{
return 5;
}
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
ZhiNengPPTCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"ZhiNengPPTCollectionViewCell" forIndexPath:indexPath];
return cell;
}
//section
- (UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout insetForSectionAtIndex:(NSInteger)section{
return UIEdgeInsetsMake(0, 0, 0, 0);
}
//cell
- (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout minimumLineSpacingForSectionAtIndex:(NSInteger)section{
return 10;
}
//cell
- (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout ForSectionAtIndex:(NSInteger)section{
return 10;
}
// UICollectionViewCell
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath
{
///458 269
return CGSizeMake((UISCREEN_WIDTH-42)/2.0, (UISCREEN_WIDTH-42)/2.0*270/458+30);
}
-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
{
///
}
@end

View File

@ -6,7 +6,7 @@
//
#import "DuanLuoXieZuoCellView.h"
#import "DuanLuoXieZuoQWViewController.h"
@interface DuanLuoXieZuoCellView ()
///
@ -93,6 +93,14 @@
[self mas_makeConstraints:^(MASConstraintMaker *make) {
make.bottom.equalTo(viewback).offset(20);
}];
UIButton *btitem = [[UIButton alloc] init];
[self addSubview:btitem];
[btitem mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self);
}];
[btitem addTarget:self action:@selector(nextAction) forControlEvents:UIControlEventTouchUpInside];
}
return self;
}
@ -131,4 +139,10 @@
self.lbwz.strValue = strvalue;
}
-(void)nextAction
{
DuanLuoXieZuoQWViewController *vc = [DuanLuoXieZuoQWViewController new];
[self.viewController.navigationController pushViewController:vc animated:YES];
}
@end

View File

@ -0,0 +1,16 @@
//
// DuanLuoXieZuoQWViewController.h
// ProductApp
//
// Created by 工作 on 2024/10/8.
//
#import "BaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface DuanLuoXieZuoQWViewController : BaseViewController
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,42 @@
//
// DuanLuoXieZuoQWViewController.m
// ProductApp
//
// Created by on 2024/10/8.
//
#import "DuanLuoXieZuoQWViewController.h"
#import "DuanLuoXieZuoQWView.h"
@interface DuanLuoXieZuoQWViewController ()
@end
@implementation DuanLuoXieZuoQWViewController
-(UIStatusBarStyle)preferredStatusBarStyle {
return UIStatusBarStyleDefault;
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:YES animated:animated];
[self showNaviGationView:YES];
[self.navigationView setTitle:@"续写润色" titleColor:RGBCOLOR(60, 60, 60)];
[self.navigationView setBackgroundColor:RGBCOLOR(251, 251, 253)];
}
- (void)viewDidLoad {
[super viewDidLoad];
[self.view setBackgroundColor:RGBCOLOR(251, 251, 253)];
DuanLuoXieZuoQWView *view = [DuanLuoXieZuoQWView new];
[self.view addSubview:view];
[view mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.bottom.equalTo(self.view);
make.top.offset(NavHeight);
}];
}
@end

View File

@ -0,0 +1,16 @@
//
// DuanLuoXieZuoQWView.h
// ProductApp
//
// Created by 工作 on 2024/10/8.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface DuanLuoXieZuoQWView : UIView
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,243 @@
//
// DuanLuoXieZuoQWView.m
// ProductApp
//
// Created by on 2024/10/8.
//
#import "DuanLuoXieZuoQWView.h"
#import "ChongXieYiPianViewController.h"
#import "FenXiangWenZhangAlterView.h"
@interface DuanLuoXieZuoQWView ()
///
@property (nonatomic , strong) UIScrollView *scvback;
///
@property (nonatomic , strong) UILabel *lbname;
///
@property (nonatomic , strong) UILabel *lbyaoqiu;
///
@property (nonatomic , strong) NSArray *arrdata;
///
@property (nonatomic , strong) NSMutableArray *arrItems;
@property (nonatomic , strong) NSMutableArray *arrBts;
@property (nonatomic , assign) BOOL isdrawEnd;
@end
@implementation DuanLuoXieZuoQWView
-(id)initWithFrame:(CGRect)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.equalTo(self);
make.height.equalTo(self).offset(-TabHeight-20);
}];
_scvback = scvback;
[self drawInfoView:scvback];
UIView *viewbottom = [[UIView alloc] init];
[viewbottom setBackgroundColor:[UIColor whiteColor]];
[self addSubview:viewbottom];
[viewbottom mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.bottom.equalTo(self);
make.top.equalTo(scvback.mas_bottom);
}];
[self drawBottomView:viewbottom];
}
return self;
}
-(void)drawInfoView:(UIScrollView *)view
{
UILabel *lbname = [[UILabel alloc] init];
[lbname setText:@"写人作文"];
[lbname setTextColor:RGBCOLOR(51, 51, 51)];
[lbname setTextAlignment:NSTextAlignmentCenter];
[lbname setFont:[UIFont boldSystemFontOfSize:24]];
[view addSubview:lbname];
[lbname mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.top.offset(20);
make.width.equalTo(view).offset(-40);
}];
_lbname = lbname;
UILabel *lbyaoqiu = [[UILabel alloc] init];
[lbyaoqiu setText:@"在柔和的阳光中,我怀抱着一颗跳动的心,翘首以盼着那即将到来的露营之旅。那是一个普通而又特别的日子,我的心中充满了对未知世界的好奇和期待。每当夜晚来临,我总会凝视着窗外繁星点点的夜空,梦想着有一天能够亲手点燃篝火,与好友们一起分享这片刻的温馨与快乐。"];
[lbyaoqiu setTextColor:RGBCOLOR(109, 109, 109)];
[lbyaoqiu setTextAlignment:NSTextAlignmentLeft];
[lbyaoqiu setNumberOfLines:0];
[lbyaoqiu setFont:[UIFont systemFontOfSize:16]];
[view addSubview:lbyaoqiu];
[lbyaoqiu mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.equalTo(lbname);
make.top.equalTo(lbname.mas_bottom).offset(15);
}];
_lbyaoqiu = lbyaoqiu;
self.arrBts = [NSMutableArray new];
self.arrItems = [NSMutableArray new];
self.arrdata = @[@"",@"",@"",@""];
[self drawItemLastView:lbyaoqiu tag:0 bottom:nil];
}
-(void)drawItemLastView:(UIView *)view tag:(int)tag bottom:(MASConstraint *)bottom
{
ViewLable *lbwz = [[ViewLable alloc] init];
[self.scvback addSubview:lbwz];
[lbwz mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.offset(20);
make.width.equalTo(self.scvback).offset(-40);
make.top.equalTo(view.mas_bottom).offset(20);
}];
lbwz.textColor = RGBCOLOR(61, 61, 61);
lbwz.textFont = [UIFont systemFontOfSize:16];
lbwz.fspeed = 0.02;
lbwz.strValue = [NSString stringWithFormat:@" %@",@"你的作文非常出色,但是可以在语言表达上更加生动有趣,增加一些形象的比喻和细节描写,让读者更加深入地了解你的思考和感受。同时,可以适当增加一些个人的经历和感受,让作文更加具有个性化和独特性。"];
__strong ViewLable *lbwzSelf = lbwz;
__block MASConstraint *bottomScroll;
[lbwz setBackHeight:^(float fheight, BOOL isend) {
if(isend)
{
if(tag<self.arrdata.count-1)
{
[self drawItemLastView:lbwzSelf tag:tag+1 bottom:bottomScroll];
}
else
{///
self.isdrawEnd = YES;
}
}
if(self.scvback.contentSize.height-self.scvback.height>0)
{
[self.scvback setContentOffset:CGPointMake(0, self.scvback.contentSize.height-self.scvback.height)];
}
}];
[self.arrItems addObject:lbwz];
if(bottom)
{
[bottom uninstall];
}
[self.scvback mas_makeConstraints:^(MASConstraintMaker *make) {
bottomScroll = make.bottom.equalTo(lbwz.mas_bottom).offset(20);
}];
UIButton *btcx = [[UIButton alloc] init];
[btcx setImage:[UIImage imageNamed:@"znxz_chongxie"] forState:UIControlStateNormal];
[self.scvback addSubview:btcx];
[btcx mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.sizeOffset(CGSizeMake(24, 24));
make.left.offset(23);
make.top.equalTo(view.mas_bottom).offset(17);
}];
[btcx addTarget:self action:@selector(cxAction:) forControlEvents:UIControlEventTouchUpInside];
[btcx setTag:tag];
[self.arrBts addObject:btcx];
}
-(void)drawBottomView:(UIView *)view
{
UIView *viewline = [[UIView alloc] init];
[viewline setBackgroundColor:RGBCOLOR(248, 248, 248)];
[view addSubview:viewline];
[viewline mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.equalTo(view);
make.height.offset(1);
}];
UIButton *btchange = [[UIButton alloc] init];
[btchange setTitle:@"要求重新写" forState:UIControlStateNormal];
[btchange setTitleColor:RGBCOLOR(61, 61, 61) forState:UIControlStateNormal];
[btchange.titleLabel setFont:[UIFont boldSystemFontOfSize:18]];
[btchange.layer setMasksToBounds:YES];
[btchange.layer setCornerRadius:10];
[btchange.layer setBorderWidth:1];
[btchange.layer setBorderColor:RGBCOLOR(216, 216, 216).CGColor];
[view addSubview:btchange];
[btchange mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.offset(20);
make.top.offset(10);
make.height.offset(40);
make.width.offset((UISCREEN_WIDTH-52)/2.0);
}];
[btchange setTag:0];
[btchange addTarget:self action:@selector(bottomAction:) forControlEvents:UIControlEventTouchUpInside];
UIButton *btcreate = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, (UISCREEN_WIDTH-52)/2.0, 40)];
[btcreate setTitle:@"保存分享" forState:UIControlStateNormal];
[btcreate setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[btcreate.titleLabel setFont:[UIFont boldSystemFontOfSize:18]];
[btcreate.layer setMasksToBounds:YES];
[btcreate.layer setCornerRadius:10];
[view addSubview:btcreate];
[btcreate mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(btchange.mas_right).offset(12);
make.top.height.equalTo(btchange);
make.right.equalTo(view).offset(-30);
}];
[btcreate setTag:1];
[btcreate addTarget:self action:@selector(bottomAction:) forControlEvents:UIControlEventTouchUpInside];
[Tools changedView:btcreate colors:MainJBColors startPoint:CGPointMake(0, 0) endPoint:CGPointMake(1, 0)];
}
-(void)cxAction:(UIButton *)sender
{
if(self.isdrawEnd==NO)
{
[HXHud showMessage:@"请等待写作完成" afterDelayType:0];
return;
}
self.isdrawEnd = NO;
ViewLable *lbwz = self.arrItems[sender.tag];
lbwz.strValue = [NSString stringWithFormat:@" %@",@"2341234123你的作文非常出色但是可以在语言表达上更加生动有趣增加一些形象的比喻和细节描写让读者更加深入地了解你的思考和感受。同时可以适当增加一些个人的经历和感受让作文更加具有个性化和独特性。"];
[lbwz setBackHeight:^(float fheight, BOOL isend) {
if(isend)
{
self.isdrawEnd = YES;
}
}];
}
-(void)bottomAction:(UIButton *)sender
{
if(self.isdrawEnd==NO)
{
[HXHud showMessage:@"请等待写作完成" afterDelayType:0];
return;
}
switch (sender.tag) {
case 0:
{
self.isdrawEnd = NO;
for(UIView *view in self.arrItems)
{
[view removeFromSuperview];
}
for(UIButton *bt in self.arrBts)
{
[bt removeFromSuperview];
}
[self.arrBts removeAllObjects];
[self.arrItems removeAllObjects];
[self drawItemLastView:self.lbyaoqiu tag:0 bottom:nil];
}
break;
case 1:
{
FenXiangWenZhangAlterView *view = [[FenXiangWenZhangAlterView alloc] initWithFrame:CGRectMake(0, 0, UISCREEN_WIDTH, UISCREEN_HEIGHT)];
[self.viewController.view addSubview:view];
[view setBackValue:^(NSInteger tag) {
}];
}
break;
default:
break;
}
}
@end