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
147f0ac2
Commit
147f0ac2
authored
May 31, 2016
by
mei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
全选BUG 修复 分享商品ID及图片赋值
parent
2e08cedf
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
84 additions
and
157 deletions
+84
-157
FollowHeartViewController.m
Lighting/Class/FollowHeartViewController.m
+41
-31
ShareViewController.h
Lighting/Class/ShareViewController.h
+1
-0
ShareViewController.m
Lighting/Class/ShareViewController.m
+4
-5
ShoppingView.m
Lighting/Class/ShoppingView.m
+1
-1
project.pbxproj
Lighting/Lighting.xcodeproj/project.pbxproj
+26
-10
Info.plist
Lighting/Lighting/Info.plist
+10
-107
Podfile.lock
Lighting/Podfile.lock
+1
-3
No files found.
Lighting/Class/FollowHeartViewController.m
View file @
147f0ac2
...
...
@@ -103,17 +103,11 @@
}
-
(
void
)
addShareView
:
(
UIButton
*
)
sender
{
[
self
.
leftSubView
.
shareBtn
setBackgroundImage
:[
UIImage
imageNamed
:
@"selectShare"
]
forState
:
UIControlStateNormal
];
ShareViewController
*
shareVC
=
[[
ShareViewController
alloc
]
init
];
shareVC
.
delegate
=
self
;
shareVC
.
preferredContentSize
=
CGSizeMake
(
280
,
130
);
shareVC
.
modalPresentationStyle
=
UIModalPresentationPopover
;
UIPopoverPresentationController
*
pop
=
shareVC
.
popoverPresentationController
;
// 箭头方向
pop
.
permittedArrowDirections
=
UIPopoverArrowDirectionLeft
;
pop
.
sourceView
=
shareVC
.
view
;
pop
.
sourceRect
=
CGRectMake
(
sender
.
mj_x
,
sender
.
mj_y
-
30
,
sender
.
mj_w
,
sender
.
mj_h
);
[
self
presentViewController
:
shareVC
animated
:
YES
completion
:
nil
];
[
self
CreateMBProgressHUDLoding
];
// 先截屏 并保存图片
[
self
savePhoto
];
}
//添加自定义场景
...
...
@@ -136,7 +130,7 @@
{
self
.
backGroundImageView
.
image
=
image
;
}
//
添加场景中
产品图
//
场景中添加
产品图
-
(
void
)
resetSubProductImage
:
(
UIImage
*
)
image
productModel
:
(
TOGoodsEntity
*
)
productModel
{
ImageCropperView
*
cropper
=
[[
ImageCropperView
alloc
]
initWithFrame
:
CGRectMake
(
400
,
200
,
300
,
225
)];
...
...
@@ -162,12 +156,11 @@
{
[
self
.
rightSubView
addRightSubViewImage
:
image
productModel
:
productModel
];
}
//分享回调
-
(
void
)
ShareProductImage
:
(
UIImage
*
)
image
{
// 先截屏 并保存图片
[
self
savePhoto
];
}
////分享回调
//- (void)ShareProductImage:(UIImage *)image
//{
//}
//全屏
-
(
void
)
setViewAnimations
:
(
UIButton
*
)
sender
{
...
...
@@ -256,14 +249,7 @@
UIImage
*
image
=
[
self
captureImageFromView
:
self
.
view
];
[
self
saveImageToPhotos
:
image
];
//
// PhysicalAddress
//// * library = [ALAssetsLibrary new];
//
//// NSData * data = UIImageJPEGRepresentation(image, 1.0);
////
//// [library writeImageDataToSavedPhotosAlbum:data metadata:nil completionBlock:nil];
}
-
(
void
)
saveImageToPhotos
:
(
UIImage
*
)
savedImage
...
...
@@ -276,20 +262,44 @@
-
(
void
)
image
:
(
UIImage
*
)
image
didFinishSavingWithError
:
(
NSError
*
)
error
contextInfo
:
(
void
*
)
contextInfo
{
NSString
*
msg
=
nil
;
if
(
error
!=
NULL
){
[
self
RemoveMBProgressHUDLoding
];
msg
=
@"保存图片失败"
;
}
else
{
[
self
RemoveMBProgressHUDLoding
];
msg
=
@"保存图片成功"
;
// 保存成功后添加到footview
[
self
addSeceneImage
:
image
];
}
//再加载分享视图
[
self
.
leftSubView
.
shareBtn
setBackgroundImage
:[
UIImage
imageNamed
:
@"selectShare"
]
forState
:
UIControlStateNormal
];
ShareViewController
*
shareVC
=
[[
ShareViewController
alloc
]
init
];
shareVC
.
delegate
=
self
;
shareVC
.
preferredContentSize
=
CGSizeMake
(
280
,
130
);
shareVC
.
modalPresentationStyle
=
UIModalPresentationPopover
;
shareVC
.
shareImage
=
image
;
NSString
*
str
=
@""
;
if
(
self
.
productModelArray
.
count
>
0
)
{
for
(
int
i
=
0
;
i
<
self
.
productModelArray
.
count
;
i
++
)
{
ImageCropperView
*
cropper
=
[
self
.
productModelArray
objectAtIndex
:
i
];
if
([
str
isEqualToString
:
@""
])
{
str
=
[
NSString
stringWithFormat
:
@"%@"
,
cropper
.
GoodsEntity
.
fid
];
}
else
{
str
=
[
NSString
stringWithFormat
:
@"%@,%@"
,
str
,
cropper
.
GoodsEntity
.
fid
];
}
}
}
shareVC
.
goodsIDs
=
str
;
UIPopoverPresentationController
*
pop
=
shareVC
.
popoverPresentationController
;
// 箭头方向
pop
.
permittedArrowDirections
=
UIPopoverArrowDirectionLeft
;
pop
.
sourceView
=
shareVC
.
view
;
pop
.
sourceRect
=
CGRectMake
(
self
.
leftSubView
.
shareBtn
.
mj_x
,
self
.
leftSubView
.
shareBtn
.
mj_y
-
30
,
self
.
leftSubView
.
shareBtn
.
mj_w
,
self
.
leftSubView
.
shareBtn
.
mj_h
);
[
self
presentViewController
:
shareVC
animated
:
YES
completion
:
nil
];
}
}
...
...
Lighting/Class/ShareViewController.h
View file @
147f0ac2
...
...
@@ -41,6 +41,7 @@
/**
* 传入商品ID字符串(多个商品时用逗号隔开)
*/
...
...
Lighting/Class/ShareViewController.m
View file @
147f0ac2
...
...
@@ -57,12 +57,11 @@
#pragma mark -分享
-
(
void
)
sharePicture
:
(
UIButton
*
)
sender
{
//<<<<<<< HEAD
// if ([self.delegate respondsToSelector:@selector(ShareProductImage:)]) {
//=======
[
self
dismissViewControllerAnimated
:
YES
completion
:
nil
];
NSData
*
imageData
=
UIImageJPEGRepresentation
(
TCImage
(
@"登录"
),
1
.
0
);
NSDictionary
*
parameterDict
=
[
NSDictionary
dictionaryWithObjectsAndKeys
:
@"0b44439e5504e371015504f73d4f0025,0b44439e5504e371015504feae270028"
,
@"goodsIds"
,
@""
,
@"title"
,
@""
,
@"remark"
,
nil
];
NSData
*
imageData
=
UIImageJPEGRepresentation
(
self
.
shareImage
,
1
.
0
);
// 0b44439e5504e371015504f73d4f0025,0b44439e5504e371015504feae270028
NSDictionary
*
parameterDict
=
[
NSDictionary
dictionaryWithObjectsAndKeys
:
@"这里是截图上所有商品的goodsId ,分割 后面不动"
,
@"goodsIds"
,
@""
,
@"title"
,
@""
,
@"remark"
,
nil
];
//上传图片
[[
NetworkRequestClassManager
Manager
]
UploadImageWithURL
:[
NSString
stringWithFormat
:
@"%@%@"
,
ServerAddress
,
@"/system/shareGoods"
]
WithRequestType
:
0
WithImageDatas
:
imageData
WithParameter
:
parameterDict
WithReturnValueBlock
:^
(
id
returnValue
)
{
...
...
Lighting/Class/ShoppingView.m
View file @
147f0ac2
...
...
@@ -128,7 +128,7 @@
[
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
:
1
]];
[
self
.
AddArray
addObject
:[
self
.
productModelArray
objectAtIndex
:
i
]];
}
[
self
.
confirmAddBtn
setTitle
:[
NSString
stringWithFormat
:
@"确认添加(%d)"
,
self
.
selectTagArray
.
count
]
forState
:
UIControlStateNormal
];
self
.
isAllSelected
=
YES
;
...
...
Lighting/Lighting.xcodeproj/project.pbxproj
View file @
147f0ac2
...
...
@@ -1344,6 +1344,7 @@
29706D9F1CD082980003C412
/* Resources */
,
F01581ED83DE9D2797491517
/* 📦 Embed Pods Frameworks */
,
7BC17D654525385DDB94F6E1
/* 📦 Copy Pods Resources */
,
3F3971B12BEF8F66850D46F0
/* Embed Pods Frameworks */
,
);
buildRules
=
(
);
...
...
@@ -1423,6 +1424,21 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
3F3971B12BEF8F66850D46F0
/* Embed Pods Frameworks */
=
{
isa
=
PBXShellScriptBuildPhase
;
buildActionMask
=
2147483647
;
files
=
(
);
inputPaths
=
(
);
name
=
"Embed Pods Frameworks"
;
outputPaths
=
(
);
runOnlyForDeploymentPostprocessing
=
0
;
shellPath
=
/bin/sh
;
shellScript
=
"\"${SRCROOT}/Pods/Target Support Files/Pods-Lighting/Pods-Lighting-frameworks.sh\"\n"
;
showEnvVarsInLog
=
0
;
};
48AA9F8E7B748F9C3254AA87
/* 📦 Check Pods Manifest.lock */
=
{
isa
=
PBXShellScriptBuildPhase
;
buildActionMask
=
2147483647
;
...
...
@@ -1626,7 +1642,7 @@
CLANG_WARN_OBJC_ROOT_CLASS
=
YES_ERROR
;
CLANG_WARN_UNREACHABLE_CODE
=
YES
;
CLANG_WARN__DUPLICATE_METHOD_MATCH
=
YES
;
CODE_SIGN_IDENTITY
=
"
iPhone Developer: 超级 朱 (SXSQ6S5D55)
"
;
CODE_SIGN_IDENTITY
=
""
;
COPY_PHASE_STRIP
=
NO
;
DEBUG_INFORMATION_FORMAT
=
dwarf
;
ENABLE_STRICT_OBJC_MSGSEND
=
YES
;
...
...
@@ -1648,7 +1664,7 @@
IPHONEOS_DEPLOYMENT_TARGET
=
9.3
;
MTL_ENABLE_DEBUG_INFO
=
YES
;
ONLY_ACTIVE_ARCH
=
YES
;
PROVISIONING_PROFILE
=
"
d25ba75f-c4da-4bef-b966-3a998dcbffbe
"
;
PROVISIONING_PROFILE
=
""
;
SDKROOT
=
iphoneos
;
TARGETED_DEVICE_FAMILY
=
2
;
};
...
...
@@ -1672,7 +1688,7 @@
CLANG_WARN_OBJC_ROOT_CLASS
=
YES_ERROR
;
CLANG_WARN_UNREACHABLE_CODE
=
YES
;
CLANG_WARN__DUPLICATE_METHOD_MATCH
=
YES
;
CODE_SIGN_IDENTITY
=
"
iPhone Developer: 超级 朱 (SXSQ6S5D55)
"
;
CODE_SIGN_IDENTITY
=
""
;
COPY_PHASE_STRIP
=
NO
;
DEBUG_INFORMATION_FORMAT
=
"dwarf-with-dsym"
;
ENABLE_NS_ASSERTIONS
=
NO
;
...
...
@@ -1687,7 +1703,7 @@
GCC_WARN_UNUSED_VARIABLE
=
YES
;
IPHONEOS_DEPLOYMENT_TARGET
=
9.3
;
MTL_ENABLE_DEBUG_INFO
=
NO
;
PROVISIONING_PROFILE
=
"
d25ba75f-c4da-4bef-b966-3a998dcbffbe
"
;
PROVISIONING_PROFILE
=
""
;
SDKROOT
=
iphoneos
;
TARGETED_DEVICE_FAMILY
=
2
;
VALIDATE_PRODUCT
=
YES
;
...
...
@@ -1701,8 +1717,8 @@
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME
=
"Brand Assets"
;
CLANG_ENABLE_OBJC_WEAK
=
YES
;
CODE_SIGN_IDENTITY
=
"
iPhone Developer: 云霄 曹 (WM8ZU7YY98)
"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"
iPhone Developer: 云霄 曹 (WM8ZU7YY98)
"
;
CODE_SIGN_IDENTITY
=
""
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
""
;
COMPRESS_PNG_FILES
=
NO
;
ENABLE_BITCODE
=
NO
;
FRAMEWORK_SEARCH_PATHS
=
"$(inherited)"
;
...
...
@@ -1744,7 +1760,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER
=
com.gomore.opple
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PROVISIONING_PROFILE
=
"
f89bebf5-81e2-4c61-9052-8c7bb0f9ddd6
"
;
PROVISIONING_PROFILE
=
""
;
STRIP_PNG_TEXT
=
NO
;
USER_HEADER_SEARCH_PATHS
=
"$(PODS_ROOT)/**"
;
};
...
...
@@ -1757,8 +1773,8 @@
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME
=
"Brand Assets"
;
CLANG_ENABLE_OBJC_WEAK
=
YES
;
CODE_SIGN_IDENTITY
=
"
iPhone Developer: 云霄 曹 (WM8ZU7YY98)
"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"
iPhone Developer: 云霄 曹 (WM8ZU7YY98)
"
;
CODE_SIGN_IDENTITY
=
""
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
""
;
COMPRESS_PNG_FILES
=
NO
;
ENABLE_BITCODE
=
NO
;
FRAMEWORK_SEARCH_PATHS
=
"$(inherited)"
;
...
...
@@ -1800,7 +1816,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER
=
com.gomore.opple
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PROVISIONING_PROFILE
=
"
f89bebf5-81e2-4c61-9052-8c7bb0f9ddd6
"
;
PROVISIONING_PROFILE
=
""
;
STRIP_PNG_TEXT
=
NO
;
USER_HEADER_SEARCH_PATHS
=
"$(PODS_ROOT)/**"
;
};
...
...
Lighting/Lighting/Info.plist
View file @
147f0ac2
...
...
@@ -41,115 +41,18 @@
<
/
a
rr
a
y
>
<
/
d
i
c
t
>
<
/
a
rr
a
y
>
<
k
e
y
>
NSAppTransportSecurity
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
NSExceptionDomains
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
log.umsns.com
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
NSIncludesSubdomains
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
NSTemporaryExceptionAllowsInsecureHTTPLoads
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
NSTemporaryExceptionMinimumTLSVersion
<
/k
e
y
>
<
string
>
TLSv1.1
<
/string
>
<
/
d
i
c
t
>
<
k
e
y
>
sns.whalecloud.com
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
NSIncludesSubdomains
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
NSTemporaryExceptionAllowsInsecureHTTPLoads
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
NSTemporaryExceptionMinimumTLSVersion
<
/k
e
y
>
<
string
>
TLSv1.1
<
/string
>
<
/
d
i
c
t
>
<
!--
集成新浪微博对应的HTTP白名单--
>
<
k
e
y
>
sina.cn
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
NSIncludesSubdomains
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
NSThirdPartyExceptionRequiresForwardSecrecy
<
/k
e
y
>
<
fa
ls
e
/
>
<
/
d
i
c
t
>
<
k
e
y
>
weibo.cn
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
NSIncludesSubdomains
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
NSThirdPartyExceptionRequiresForwardSecrecy
<
/k
e
y
>
<
fa
ls
e
/
>
<
/
d
i
c
t
>
<
k
e
y
>
weibo.com
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
NSIncludesSubdomains
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
NSThirdPartyExceptionAllowsInsecureHTTPLoads
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
NSThirdPartyExceptionRequiresForwardSecrecy
<
/k
e
y
>
<
fa
ls
e
/
>
<
/
d
i
c
t
>
<
k
e
y
>
sinaimg.cn
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
NSIncludesSubdomains
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
NSThirdPartyExceptionAllowsInsecureHTTPLoads
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
NSThirdPartyExceptionRequiresForwardSecrecy
<
/k
e
y
>
<
fa
ls
e
/
>
<
/
d
i
c
t
>
<
k
e
y
>
sinajs.cn
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
NSIncludesSubdomains
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
NSThirdPartyExceptionAllowsInsecureHTTPLoads
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
NSThirdPartyExceptionRequiresForwardSecrecy
<
/k
e
y
>
<
fa
ls
e
/
>
<
/
d
i
c
t
>
<
k
e
y
>
sina.com.cn
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
NSIncludesSubdomains
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
NSThirdPartyExceptionAllowsInsecureHTTPLoads
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
NSThirdPartyExceptionRequiresForwardSecrecy
<
/k
e
y
>
<
fa
ls
e
/
>
<
/
d
i
c
t
>
<
!--
新浪微博--
>
<
!--
集成微信、QQ、Qzon
e
、腾讯微博授权对应的HTTP白名单--
>
<
k
e
y
>
qq.com
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
NSIncludesSubdomains
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
NSThirdPartyExceptionAllowsInsecureHTTPLoads
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
NSThirdPartyExceptionRequiresForwardSecrecy
<
/k
e
y
>
<
fa
ls
e
/
>
<
/
d
i
c
t
>
<
!--
腾讯授权--
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
k
e
y
>
LSApplicationQueriesSchemes
<
/k
e
y
>
<
a
rr
a
y
>
<
!--
微信
URL
S
c
h
e
m
e
白名单--
>
<
string
>
wechat
<
/string
>
<
string
>
weixin
<
/string
>
<
!--
新浪微博
URL
S
c
h
e
m
e
白名单--
>
<
string
>
sinaweibohd
<
/string
>
<
string
>
sinaweibo
<
/string
>
<
string
>
sinaweibosso
<
/string
>
<
string
>
weibosdk
<
/string
>
<
string
>
weibosdk2.5
<
/string
>
<
/
a
rr
a
y
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
>
1
<
/string
>
<
k
e
y
>
LSApplicationQueriesSchemes
<
/k
e
y
>
<
a
rr
a
y
>
<
string
>
wechat
<
/string
>
<
string
>
weixin
<
/string
>
<
string
>
sinaweibohd
<
/string
>
<
string
>
sinaweibo
<
/string
>
<
string
>
sinaweibosso
<
/string
>
<
string
>
weibosdk
<
/string
>
<
string
>
weibosdk2.5
<
/string
>
<
/
a
rr
a
y
>
<
k
e
y
>
LSRequiresIPhoneOS
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
NSAllowsArbitraryLoads
<
/k
e
y
>
...
...
Lighting/Podfile.lock
View file @
147f0ac2
...
...
@@ -64,6 +64,4 @@ SPEC CHECKSUMS:
SVProgressHUD: b0830714205bea1317ea1a2ebc71e5633af334d4
UMengSocial: 48b67179c492a8cf7803fbb0438b8f55432e2fc1
PODFILE CHECKSUM: ce813becb6471581d2231aa1586a015081ae7114
COCOAPODS: 1.0.0
COCOAPODS: 0.39.0
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