Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
O
Opple-iOS
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张杰
Opple-iOS
Commits
e32a2727
Commit
e32a2727
authored
Jun 04, 2016
by
mei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试问题 优化
parent
805bdb02
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
42 additions
and
14 deletions
+42
-14
FollowHeartViewController.h
Lighting/Class/FollowHeartViewController.h
+1
-1
FollowHeartViewController.m
Lighting/Class/FollowHeartViewController.m
+17
-4
ProductLibraryView.m
Lighting/Class/ProductLibraryView.m
+2
-2
ShareViewController.h
Lighting/Class/ShareViewController.h
+2
-0
ShareViewController.m
Lighting/Class/ShareViewController.m
+6
-1
ShoppingCell.m
Lighting/Class/ShoppingCell.m
+1
-1
ShoppingView.m
Lighting/Class/ShoppingView.m
+13
-5
No files found.
Lighting/Class/FollowHeartViewController.h
View file @
e32a2727
...
...
@@ -26,7 +26,7 @@
@end
@interface
FollowHeartViewController
:
BaseViewController
<
LeftViewBtnClickdelegate
,
RightViewBtnClickdelegate
,
FootViewBtnClickdelegate
,
UIGestureRecognizerDelegate
,
AddSecenePicturedelegate
,
AddProductPicturedelegate
,
SharePicturedelegate
,
AddCustomPicturedelegate
,
Shoppingdelegate
,
ImageCropperDelegate
,
HelpButtondelegate
>
@interface
FollowHeartViewController
:
BaseViewController
<
LeftViewBtnClickdelegate
,
RightViewBtnClickdelegate
,
FootViewBtnClickdelegate
,
UIGestureRecognizerDelegate
,
AddSecenePicturedelegate
,
AddProductPicturedelegate
,
SharePicturedelegate
,
AddCustomPicturedelegate
,
Shoppingdelegate
,
ImageCropperDelegate
,
HelpButtondelegate
,
UIPopoverPresentationControllerDelegate
>
@property
(
nonatomic
,
assign
)
id
<
FollowHeartViewAddpicturedelegate
>
delegate
;
@property
(
nonatomic
,
strong
)
LeftSubView
*
leftSubView
;
@property
(
nonatomic
,
strong
)
RightSubView
*
rightSubView
;
...
...
Lighting/Class/FollowHeartViewController.m
View file @
e32a2727
...
...
@@ -180,6 +180,7 @@
self
.
footSubView
.
frame
=
CGRectMake
(
0
,
ScreenHeight
,
ScreenWidth
,
150
);
self
.
temporaryBtn
.
frame
=
CGRectMake
(
sender
.
frame
.
origin
.
x
,
20
,
sender
.
frame
.
size
.
width
,
sender
.
frame
.
size
.
height
);
[
UIView
commitAnimations
];
self
.
temporaryBtn
.
hidden
=
YES
;
}
-
(
void
)
addHelpView
:
(
UIButton
*
)
btn
{
...
...
@@ -245,8 +246,9 @@
-
(
void
)
savePhoto
{
[
self
setViewAnimations
:
self
.
leftSubView
.
fullViewBtn
];
[
self
setViewAnimations
:
self
.
leftSubView
.
fullViewBtn
];
[
self
RemoveMBProgressHUDLoding
];
UIImage
*
image
=
[
self
captureImageFromView
:
self
.
view
];
[
self
saveImageToPhotos
:
image
];
...
...
@@ -254,6 +256,9 @@
-
(
void
)
saveImageToPhotos
:
(
UIImage
*
)
savedImage
{
[
self
CreateMBProgressHUDLoding
];
self
.
temporaryBtn
.
hidden
=
NO
;
[
self
resetViewDidSelected
:
self
.
temporaryBtn
];
UIImageWriteToSavedPhotosAlbum
(
savedImage
,
self
,
@selector
(
image
:
didFinishSavingWithError
:
contextInfo
:
),
NULL
);
}
...
...
@@ -271,7 +276,7 @@
}
else
{
[
self
RemoveMBProgressHUDLoding
];
msg
=
@"保存图片成功"
;
//
保存成功后添加到footview
//
保存成功后添加到footview
[
self
addSeceneImage
:
image
];
//再加载分享视图
[
self
.
leftSubView
.
shareBtn
setBackgroundImage
:[
UIImage
imageNamed
:
@"selectShare"
]
forState
:
UIControlStateNormal
];
...
...
@@ -294,6 +299,7 @@
}
shareVC
.
goodsIDs
=
str
;
UIPopoverPresentationController
*
pop
=
shareVC
.
popoverPresentationController
;
pop
.
delegate
=
self
;
// 箭头方向
pop
.
permittedArrowDirections
=
UIPopoverArrowDirectionLeft
;
pop
.
sourceView
=
shareVC
.
view
;
...
...
@@ -391,8 +397,15 @@
});
}
-
(
void
)
popoverPresentationControllerDidDismissPopover
:
(
UIPopoverPresentationController
*
)
popoverPresentationController
{
[
self
.
leftSubView
.
shareBtn
setBackgroundImage
:[
UIImage
imageNamed
:
@"fenxiang"
]
forState
:
UIControlStateNormal
];
}
-
(
void
)
resetShareBtn
{
[
self
.
leftSubView
.
shareBtn
setBackgroundImage
:[
UIImage
imageNamed
:
@"fenxiang"
]
forState
:
UIControlStateNormal
];
}
-
(
void
)
didReceiveMemoryWarning
{
[
super
didReceiveMemoryWarning
];
// Dispose of any resources that can be recreated.
...
...
Lighting/Class/ProductLibraryView.m
View file @
e32a2727
...
...
@@ -316,7 +316,7 @@
[
backView
setImage
:[
UIImage
imageNamed
:
@"line"
]];
[
self
.
headerView
addSubview
:
backView
];
//搜索图标
UIButton
*
searchBtn
=
[[
UIButton
alloc
]
initWithFrame
:
CGRectMake
(
5
,
0
,
3
5
,
25
)];
UIButton
*
searchBtn
=
[[
UIButton
alloc
]
initWithFrame
:
CGRectMake
(
10
,
0
,
2
5
,
25
)];
searchBtn
.
backgroundColor
=
RGB
(
225
,
225
,
225
,
1
);
[
searchBtn
setBackgroundImage
:[
UIImage
imageNamed
:
@"search"
]
forState
:
UIControlStateNormal
]
;
[
searchBtn
addTarget
:
self
action
:
@selector
(
searchProduct
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
...
...
@@ -393,7 +393,7 @@
break
;
}
[
self
.
seceneTableView
reloadData
];
[
self
.
collectionView
.
mj_header
beginRefreshing
];
//
[self.collectionView.mj_header beginRefreshing];
}
-
(
void
)
didSelectSection
:
(
UIButton
*
)
sender
{
...
...
Lighting/Class/ShareViewController.h
View file @
e32a2727
...
...
@@ -29,6 +29,8 @@
* 上传失败
*/
-
(
void
)
UploadImageFailue
;
//界面消失
-
(
void
)
resetShareBtn
;
@end
...
...
Lighting/Class/ShareViewController.m
View file @
e32a2727
...
...
@@ -156,7 +156,12 @@
NSLog
(
@"share to sns name is %@"
,[[
response
.
data
allKeys
]
objectAtIndex
:
0
]);
}
}
-
(
void
)
viewDidDisappear
:
(
BOOL
)
animated
;
{
if
([
self
.
delegate
respondsToSelector
:
@selector
(
resetShareBtn
)])
{
[
self
.
delegate
resetShareBtn
];
}
}
-
(
void
)
didReceiveMemoryWarning
{
[
super
didReceiveMemoryWarning
];
// Dispose of any resources that can be recreated.
...
...
Lighting/Class/ShoppingCell.m
View file @
e32a2727
...
...
@@ -26,7 +26,7 @@
-
(
void
)
bulidLayout
{
// 选中
self
.
selectedButton
=
[[
CustomShopingSeclectButton
alloc
]
initWithFrame
:
CGRectMake
(
20
,
25
,
Width
/
12
-
40
,
Height
-
5
0
)];
self
.
selectedButton
=
[[
CustomShopingSeclectButton
alloc
]
initWithFrame
:
CGRectMake
(
20
,
25
,
30
,
Height
-
6
0
)];
[
self
.
selectedButton
setBackgroundImage
:[
UIImage
imageNamed
:
@"box-副本"
]
forState
:
UIControlStateNormal
];
// box-副本
[
self
.
contentView
addSubview
:
self
.
selectedButton
];
...
...
Lighting/Class/ShoppingView.m
View file @
e32a2727
...
...
@@ -65,13 +65,13 @@
UIButton
*
btn
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
switch
(
i
)
{
case
0
:
btn
.
frame
=
CGRectMake
(
self
.
subView
.
frame
.
size
.
width
/
8
*
(
i
+
1
),
10
,
self
.
subView
.
frame
.
size
.
width
/
9
,
30
);
btn
.
frame
=
CGRectMake
(
self
.
subView
.
frame
.
size
.
width
/
8
*
(
i
+
1
)
-
10
,
10
,
self
.
subView
.
frame
.
size
.
width
/
9
,
30
);
break
;
case
1
:
btn
.
frame
=
CGRectMake
(
self
.
subView
.
frame
.
size
.
width
/
9
*
(
i
+
3
)
-
70
,
10
,
self
.
subView
.
frame
.
size
.
width
/
9
,
30
);
break
;
case
2
:
btn
.
frame
=
CGRectMake
(
self
.
subView
.
frame
.
size
.
width
/
7
*
(
i
+
2
)
+
3
5
,
10
,
self
.
subView
.
frame
.
size
.
width
/
9
,
30
);
btn
.
frame
=
CGRectMake
(
self
.
subView
.
frame
.
size
.
width
/
7
*
(
i
+
2
)
+
2
5
,
10
,
self
.
subView
.
frame
.
size
.
width
/
9
,
30
);
break
;
case
3
:
...
...
@@ -127,8 +127,11 @@
[
sender
setBackgroundImage
:[
UIImage
imageNamed
:
@"bg"
]
forState
:
UIControlStateNormal
];
[
self
.
shoppingTableView
reloadData
];
for
(
int
i
=
0
;
i
<
self
.
productModelArray
.
count
;
i
++
)
{
[
self
.
selectTagArray
addObject
:[
NSString
stringWithFormat
:
@"%d"
,
i
]];
[
self
.
AddArray
addObject
:[
self
.
productModelArray
objectAtIndex
:
i
]];
if
(
!
[
self
.
selectTagArray
containsObject
:[
NSString
stringWithFormat
:
@"%d"
,
i
]])
{
[
self
.
selectTagArray
addObject
:[
NSString
stringWithFormat
:
@"%d"
,
i
]];
[
self
.
AddArray
addObject
:[
self
.
productModelArray
objectAtIndex
:
i
]];
}
}
[
self
.
confirmAddBtn
setTitle
:[
NSString
stringWithFormat
:
@"确认添加(%d)"
,
self
.
selectTagArray
.
count
]
forState
:
UIControlStateNormal
];
self
.
isAllSelected
=
YES
;
...
...
@@ -151,6 +154,8 @@
[
self
.
productModelArray
removeAllObjects
];
[
self
.
AddArray
removeAllObjects
];
[
self
.
confirmAddBtn
setTitle
:[
NSString
stringWithFormat
:
@"确认添加(0)"
]
forState
:
UIControlStateNormal
];
[
self
.
allSelectBtn
setBackgroundImage
:[
UIImage
imageNamed
:
@"box-副本"
]
forState
:
UIControlStateNormal
];
self
.
isAllSelected
=
NO
;
}
else
{
for
(
int
i
=
0
;
i
<
self
.
selectTagArray
.
count
;
i
++
)
{
...
...
@@ -181,7 +186,10 @@
[
sender
setBackgroundImage
:[
UIImage
imageNamed
:
@"bg"
]
forState
:
UIControlStateNormal
];
[
self
.
selectTagArray
addObject
:[
NSString
stringWithFormat
:
@"%d"
,
sender
.
tag
]];
[
self
.
AddArray
addObject
:[
self
.
productModelArray
objectAtIndex
:
sender
.
tag
]];
if
(
!
self
.
isAllSelected
&&
self
.
selectTagArray
.
count
==
self
.
self
.
productModelArray
.
count
)
{
[
self
.
allSelectBtn
setBackgroundImage
:[
UIImage
imageNamed
:
@"bg"
]
forState
:
UIControlStateNormal
];
self
.
isAllSelected
=
YES
;
}
}
[
self
.
confirmAddBtn
setTitle
:[
NSString
stringWithFormat
:
@"确认添加(%d)"
,
self
.
selectTagArray
.
count
]
forState
:
UIControlStateNormal
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment