Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
红
红星美凯龙管理在线APP 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
张杰
红星美凯龙管理在线APP IOS
Commits
c102b2e0
Commit
c102b2e0
authored
Dec 30, 2015
by
admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复bug
parent
f7270c2c
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
98 additions
and
57 deletions
+98
-57
UserInterfaceState.xcuserstate
...userdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
Breakpoints_v2.xcbkptlist
...ta/admin.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
+16
-0
AppDelegate.m
redstar/Classes/AppDelegate/AppDelegate.m
+3
-1
PictureStoryViewController.h
...PictureDetail/ViewController/PictureStoryViewController.h
+1
-0
PictureStoryViewController.m
...PictureDetail/ViewController/PictureStoryViewController.m
+75
-55
PictureTableCell.m
...dule/Function/Picture/PictureList/Cell/PictureTableCell.m
+1
-1
PictureViewController.m
...icture/PictureList/ViewController/PictureViewController.m
+1
-0
HomeViewController.m
...r/Classes/Module/Home/ViewController/HomeViewController.m
+1
-0
No files found.
redstar.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
View file @
c102b2e0
No preview for this file type
redstar.xcworkspace/xcuserdata/admin.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
View file @
c102b2e0
...
...
@@ -13,5 +13,21 @@
stopOnStyle =
"0"
>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
shouldBeEnabled =
"Yes"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"redstar/Classes/Module/Function/Picture/PictureDetail/ViewController/PictureStoryViewController.m"
timestampString =
"473182309.370969"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"81"
endingLineNumber =
"81"
landmarkName =
"-imageManager:transformDownloadedImage:withURL:"
landmarkType =
"5"
>
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
redstar/Classes/AppDelegate/AppDelegate.m
View file @
c102b2e0
...
...
@@ -10,6 +10,7 @@
#import "LoginViewController.h"
#import "RootTabBarController.h"
#import "APService.h"
@interface
AppDelegate
()
@end
...
...
@@ -22,7 +23,6 @@
self
.
window
=
[[
UIWindow
alloc
]
initWithFrame
:[
UIScreen
mainScreen
].
bounds
];
_window
.
backgroundColor
=
[
UIColor
whiteColor
];
[
_window
makeKeyAndVisible
];
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
@
(
10
)
forKey
:
@"requestNumber"
];
// 设置根控制器
...
...
@@ -102,4 +102,6 @@ fetchCompletionHandler:(void(^)(UIBackgroundFetchResult))completionHandler {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
@end
redstar/Classes/Module/Function/Picture/PictureDetail/ViewController/PictureStoryViewController.h
View file @
c102b2e0
...
...
@@ -10,4 +10,5 @@
@interface
PictureStoryViewController
:
UIViewController
@property
(
nonatomic
,
copy
)
NSString
*
uuid
;
@property
(
nonatomic
,
strong
)
NSString
*
titleStr
;
@end
redstar/Classes/Module/Function/Picture/PictureDetail/ViewController/PictureStoryViewController.m
View file @
c102b2e0
...
...
@@ -13,6 +13,7 @@
#import "PictureTextTableCell.h"
#import "PictureCommentTableCell.h"
#import "PictureTextTableViewCell.h"
#import "UIImage+Fit.h"
#import "CheckPicViewController.h"
...
...
@@ -24,12 +25,14 @@
#import <UIImageView+WebCache.h>
#import <UIButton+WebCache.h>
#import <SDWebImageManager.h>
#import <SDImageCache.h>
#define kPictureDetailTableCell @"PictureDetailTableViewCell"
#define kPictureTextTableCell @"PictureTextTableViewCell"
#define kPictureCommentTableCell @"pictureCommentTableViewCell"
#define kPictureTextTableViewCell @"pictureTextTAbleTableCell"
@interface
PictureStoryViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
,
UITextViewDelegate
>
@interface
PictureStoryViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
,
UITextViewDelegate
,
SDWebImageManagerDelegate
>
@property
(
nonatomic
,
strong
)
UITableView
*
tableView
;
@property
(
nonatomic
,
assign
)
int
clickNumber
;
@property
(
nonatomic
,
strong
)
UIView
*
backGroundView
;
...
...
@@ -67,6 +70,15 @@
_clickNumber
=
0
;
[
self
requestPicturePraiseDetail
];
}
-
(
UIImage
*
)
imageManager
:
(
SDWebImageManager
*
)
imageManager
transformDownloadedImage
:
(
UIImage
*
)
image
withURL
:
(
NSURL
*
)
imageURL
{
return
[
self
reSizeImage
:
image
toSize
:
CGSizeMake
(
kScreenWidth
-
40
,
170
)];
}
#pragma mark - Private Methods
...
...
@@ -102,9 +114,6 @@
[
_picTextArray
addObject
:
picText
];
}
// dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), ^{
// [self reloadPictureText:_picTextArray];
// });
self
.
tableView
.
delegate
=
self
;
self
.
tableView
.
dataSource
=
self
;
...
...
@@ -114,44 +123,11 @@
}
-
(
void
)
reloadPictureText
:
(
NSMutableArray
*
)
picTextArray
{
if
(
picTextArray
.
count
==
0
)
{
return
;
}
for
(
int
i
=
0
;
i
<
picTextArray
.
count
;
i
++
)
{
PicTextModel
*
picText
=
picTextArray
[
i
];
if
(
picText
.
fileName
.
length
!=
0
)
{
NSURL
*
imageURL
=
[
NSURL
URLWithString
:
picText
.
fileUrl
];
NSData
*
imageData
=
[
NSData
dataWithContentsOfURL
:
imageURL
];
NSString
*
imageName
=
picText
.
fileName
;
[
_imageNameArray
addObject
:
imageName
];
// 获取沙盒目录
NSString
*
cachePath
=
[
NSSearchPathForDirectoriesInDomains
(
NSCachesDirectory
,
NSUserDomainMask
,
YES
)
objectAtIndex
:
0
];
NSString
*
fullPath
=
[
cachePath
stringByAppendingPathComponent
:
imageName
];
// 将图片写入文件
[
imageData
writeToFile
:
fullPath
atomically
:
NO
];
}
}
dispatch_async
(
dispatch_get_main_queue
(),
^
{
[
_tableView
reloadData
];
});
}
-
(
void
)
setupNav
{
UILabel
*
customLab
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
40
,
30
)];
[
customLab
setTextColor
:[
UIColor
whiteColor
]];
[
customLab
setText
:
@"图说口碑详情"
];
[
customLab
setText
:
[
NSString
stringWithFormat
:
@"%@详情"
,
self
.
titleStr
]
];
customLab
.
font
=
[
UIFont
boldSystemFontOfSize
:
19
];
self
.
navigationItem
.
titleView
=
customLab
;
...
...
@@ -295,6 +271,13 @@
[
self
.
navigationController
pushViewController
:
checkVC
animated
:
YES
];
}
-
(
void
)
didReceiveMemoryWarning
{
[
super
didReceiveMemoryWarning
];
[[
SDImageCache
sharedImageCache
]
clearMemory
];
[[
SDImageCache
sharedImageCache
]
setValue
:
nil
forKey
:
@"memCache"
];
}
#pragma mark - UITableView DataSource/Delegate
-
(
NSInteger
)
numberOfSectionsInTableView
:
(
UITableView
*
)
tableView
{
...
...
@@ -371,11 +354,38 @@
NSURL
*
imageUrl
=
[
NSURL
URLWithString
:[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
picText
.
fileUrl
]];
UIImage
*
defaultImage
=
[
UIImage
imageNamed
:
@"default_pic"
];
// defaultImage = [defaultImage resizableImageWithCapInsets:UIEdgeInsetsMake(38, 85, 22, 85) resizingMode:UIImageResizingModeStretch];
[
cell
.
bigImageView
sd_setImageWithURL
:
imageUrl
placeholderImage
:
defaultImage
];
// [cell.bigImageView sd_setImageWithURL:imageUrl placeholderImage:[UIImage imageNamed:@"default_pic"]];
// [cell.bigImageView sd_setImageWithURL:imageUrl];
SDWebImageManager
*
manager
=
[
SDWebImageManager
sharedManager
];
manager
.
delegate
=
self
;
[
manager
downloadImageWithURL
:
imageUrl
options
:
0
progress
:
nil
completed
:^
(
UIImage
*
image
,
NSError
*
error
,
SDImageCacheType
cacheType
,
BOOL
finished
,
NSURL
*
imageURL
)
{
if
(
image
)
{
cell
.
bigImageView
.
image
=
image
;
}
}];
// [imageVview sd_setImageWithURL:imageUrl placeholderImage:defaultImage completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) {
// cacheType = SDImageCacheTypeDisk;
// // UIImage *image00 = [UIImage image:image fillSize:CGSizeMake(kScreenWidth - 40, 170)];
// UIImage *image00 = [self reSizeImage:image toSize:CGSizeMake(kScreenWidth - 40, 170)];
// // UIImage *image11 = [self scaleImage:image toScale:<#(float)#>]
//
//
// cell.bigImageView.image = image00;
// }];
// [cell.bigImageView sd_setImageWithURL:imageUrl placeholderImage:defaultImage];
UITapGestureRecognizer
*
tap
=
[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
tapClick
:
)];
[
cell
.
bigImageView
addGestureRecognizer
:
tap
];
...
...
@@ -388,19 +398,6 @@
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
// if (_imageNameArray.count == 0) {
// cell.bigImageView.image = [UIImage imageNamed:@"default_pic"];
// } else {
// // 获取沙盒目录
// NSString *cachePath = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) objectAtIndex:0];
// NSString *fullPath = [cachePath stringByAppendingPathComponent:_imageNameArray[0]];
// UIImage *image = [UIImage imageWithContentsOfFile:fullPath];
// cell.bigImageView.image = image;
// //[cell ];
// }
return
cell
;
}
...
...
@@ -416,7 +413,30 @@
}
}
-
(
UIImage
*
)
reSizeImage
:
(
UIImage
*
)
image
toSize
:
(
CGSize
)
reSize
{
UIGraphicsBeginImageContext
(
CGSizeMake
(
reSize
.
width
,
reSize
.
height
));
[
image
drawInRect
:
CGRectMake
(
0
,
0
,
reSize
.
width
,
reSize
.
height
)];
UIImage
*
reSizeImage
=
UIGraphicsGetImageFromCurrentImageContext
();
UIGraphicsEndImageContext
();
return
reSizeImage
;
}
-
(
UIImage
*
)
scaleImage
:
(
UIImage
*
)
image
toScale
:
(
float
)
scaleSize
{
UIGraphicsBeginImageContext
(
CGSizeMake
(
image
.
size
.
width
*
scaleSize
,
image
.
size
.
height
*
scaleSize
));
[
image
drawInRect
:
CGRectMake
(
0
,
0
,
image
.
size
.
width
*
scaleSize
,
image
.
size
.
height
*
scaleSize
)];
UIImage
*
scaledImage
=
UIGraphicsGetImageFromCurrentImageContext
();
UIGraphicsEndImageContext
();
return
scaledImage
;
}
// 自定义section
-
(
UIView
*
)
tableView
:
(
UITableView
*
)
tableView
viewForHeaderInSection
:
(
NSInteger
)
section
...
...
redstar/Classes/Module/Function/Picture/PictureList/Cell/PictureTableCell.m
View file @
c102b2e0
...
...
@@ -88,7 +88,7 @@
_titleImageView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
self
.
contentView
addSubview
:
_titleImageView
];
NSLayoutConstraint
*
titleImageTop
=
[
NSLayoutConstraint
constraintWithItem
:
_titleImageView
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
1
8
];
NSLayoutConstraint
*
titleImageTop
=
[
NSLayoutConstraint
constraintWithItem
:
_titleImageView
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
2
8
];
[
self
.
contentView
addConstraint
:
titleImageTop
];
NSLayoutConstraint
*
titleImageLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_titleImageView
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
15
];
...
...
redstar/Classes/Module/Function/Picture/PictureList/ViewController/PictureViewController.m
View file @
c102b2e0
...
...
@@ -647,6 +647,7 @@
PictureListModel
*
picList
=
_allPraiseListArray
[
indexPath
.
row
];
PictureStoryViewController
*
storyVC
=
[[
PictureStoryViewController
alloc
]
init
];
storyVC
.
uuid
=
picList
.
uuid
;
storyVC
.
titleStr
=
self
.
titleStr
;
[
self
.
navigationController
pushViewController
:
storyVC
animated
:
YES
];
}
...
...
redstar/Classes/Module/Home/ViewController/HomeViewController.m
View file @
c102b2e0
...
...
@@ -560,6 +560,7 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"商场风采"
])
{
PictureViewController
*
pic
=
[[
PictureViewController
alloc
]
init
];
pic
.
come
=
@"首页"
;
pic
.
titleStr
=
@"商场风采"
;
pic
.
category
=
@"store"
;
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
pic
];
}
...
...
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