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
3a2738ae
Commit
3a2738ae
authored
Dec 03, 2015
by
admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复键盘遮住文本框
parent
2b324a30
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
125 additions
and
64 deletions
+125
-64
UserInterfaceState.xcuserstate
...userdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
AnnounceViewController.m
...unce/AnnounceList/ViewController/AnnounceViewController.m
+3
-1
CommentView.m
redstar/Classes/Module/Comment/View/CommentView.m
+2
-0
AddQuestionFooterView.h
...unction/Question/AddQuestion/View/AddQuestionFooterView.h
+3
-0
AddQuestionFooterView.m
...unction/Question/AddQuestion/View/AddQuestionFooterView.m
+0
-29
AddQuestionViewController.m
...on/AddQuestion/ViewController/AddQuestionViewController.m
+31
-9
QuestionDetailViewController.m
...stionDetail/ViewController/QuestionDetailViewController.m
+22
-0
InspectDetailFooterView.h
...outh/Inspect/InspectDetail/View/InspectDetailFooterView.h
+1
-1
InspectDetailFooterView.m
...outh/Inspect/InspectDetail/View/InspectDetailFooterView.m
+1
-17
InspectNotUploadViewController.m
...ectDetail/ViewController/InspectNotUploadViewController.m
+44
-6
RankDetailViewController.m
...king/RankDetail/ViewController/RankDetailViewController.m
+18
-1
No files found.
redstar.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
View file @
3a2738ae
No preview for this file type
redstar/Classes/Module/Announce/AnnounceList/ViewController/AnnounceViewController.m
View file @
3a2738ae
...
...
@@ -72,6 +72,7 @@
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@%@%@?read=%@&page_number=%d&page_size=%d"
,
kRedStarURL
,
kAnnounceListURL
,
user_uuid
,
_stateStr
,
page_number
,
page_size
];
HttpClient
*
httpClient
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
[
httpClient
getAnnounceListWithCompletion
:
^
(
id
response
,
NSError
*
error
)
{
NSLog
(
@"公告response = %@"
,
response
);
if
(
response
[
@"success"
])
{
NSDictionary
*
dict
=
response
[
@"data"
];
NSArray
*
array
=
dict
[
@"records"
];
...
...
@@ -135,10 +136,11 @@
}
NSLog
(
@"url ==== %@"
,
url
);
HttpClient
*
httpClient
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
[
httpClient
getAnnounceListWithCompletion
:
^
(
id
response
,
NSError
*
error
)
{
NSLog
(
@"segemnt 公告 = %@ error = %@"
,
response
,
error
);
if
(
response
[
@"success"
])
{
NSDictionary
*
dict
=
response
[
@"data"
];
NSArray
*
array
=
dict
[
@"records"
];
...
...
redstar/Classes/Module/Comment/View/CommentView.m
View file @
3a2738ae
...
...
@@ -77,6 +77,8 @@
return
YES
;
}
#pragma mark - lazy loading
-
(
UILabel
*
)
titleLabel
{
...
...
redstar/Classes/Module/Function/Question/AddQuestion/View/AddQuestionFooterView.h
View file @
3a2738ae
...
...
@@ -17,5 +17,8 @@
@property
(
nonatomic
,
strong
)
TakePhotoView
*
takePhotoView
;
@property
(
nonatomic
,
strong
)
UIButton
*
reportBtn
;
@property
(
nonatomic
,
strong
)
UILabel
*
placeholderLabel1
;
@property
(
nonatomic
,
strong
)
UILabel
*
placeholderLabel2
;
@end
redstar/Classes/Module/Function/Question/AddQuestion/View/AddQuestionFooterView.m
View file @
3a2738ae
...
...
@@ -15,9 +15,7 @@
@interface
AddQuestionFooterView
()
<
UITextViewDelegate
>
@property
(
nonatomic
,
strong
)
UIImageView
*
backImageView1
;
@property
(
nonatomic
,
strong
)
UILabel
*
placeholderLabel1
;
@property
(
nonatomic
,
strong
)
UIImageView
*
backImageView2
;
@property
(
nonatomic
,
strong
)
UILabel
*
placeholderLabel2
;
@end
@implementation
AddQuestionFooterView
...
...
@@ -101,33 +99,6 @@
}
#pragma mark - UITextView Delegate
-
(
BOOL
)
textView
:
(
UITextView
*
)
textView
shouldChangeTextInRange
:
(
NSRange
)
range
replacementText
:
(
NSString
*
)
text
{
if
(
!
[
text
isEqualToString
:
@""
])
{
if
(
textView
.
tag
==
1001
)
{
_placeholderLabel1
.
hidden
=
YES
;
}
else
{
_placeholderLabel2
.
hidden
=
YES
;
}
}
if
([
text
isEqualToString
:
@""
]
&&
range
.
location
==
0
&&
range
.
length
==
1
)
{
if
(
textView
.
tag
==
1001
)
{
_placeholderLabel1
.
hidden
=
NO
;
}
else
{
_placeholderLabel2
.
hidden
=
NO
;
}
}
if
([
text
isEqualToString
:
@"
\n
"
])
{
[
self
.
titleTextView
resignFirstResponder
];
[
self
.
contentTextView
resignFirstResponder
];
return
NO
;
}
return
YES
;
}
#pragma mark - lazy loading
...
...
redstar/Classes/Module/Function/Question/AddQuestion/ViewController/AddQuestionViewController.m
View file @
3a2738ae
...
...
@@ -22,7 +22,7 @@
#define kAddQuestionCell @"UITableViewCellIdentifier"
@interface
AddQuestionViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
,
TakePhotoViewDelegate
,
UINavigationControllerDelegate
,
UIImagePickerControllerDelegate
,
UIActionSheetDelegate
>
@interface
AddQuestionViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
,
TakePhotoViewDelegate
,
UINavigationControllerDelegate
,
UIImagePickerControllerDelegate
,
UIActionSheetDelegate
,
UITextViewDelegate
>
@property
(
nonatomic
,
strong
)
UITableView
*
tableView
;
@property
(
nonatomic
,
strong
)
AddQuestionFooterView
*
footerView
;
...
...
@@ -36,6 +36,8 @@
@property
(
nonatomic
,
strong
)
UILabel
*
selectLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
selectLabel1
;
@end
@implementation
AddQuestionViewController
...
...
@@ -415,6 +417,8 @@
}
else
{
_footerView
=
[[
AddQuestionFooterView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
kScreenWidth
,
(
kScreenHeight
-
100
-
64
))];
}
_footerView
.
titleTextView
.
delegate
=
self
;
_footerView
.
contentTextView
.
delegate
=
self
;
}
return
_footerView
;
}
...
...
@@ -423,14 +427,32 @@
[
self
.
tableView
endEditing
:
YES
];
}
/*
#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.
#pragma mark - UITextView Delegate
-
(
BOOL
)
textView
:
(
UITextView
*
)
textView
shouldChangeTextInRange
:
(
NSRange
)
range
replacementText
:
(
NSString
*
)
text
{
if
(
!
[
text
isEqualToString
:
@""
])
{
if
(
textView
.
tag
==
1001
)
{
self
.
footerView
.
placeholderLabel1
.
hidden
=
YES
;
}
else
{
self
.
footerView
.
placeholderLabel2
.
hidden
=
YES
;
}
}
if
([
text
isEqualToString
:
@""
]
&&
range
.
location
==
0
&&
range
.
length
==
1
)
{
if
(
textView
.
tag
==
1001
)
{
self
.
footerView
.
placeholderLabel1
.
hidden
=
NO
;
}
else
{
self
.
footerView
.
placeholderLabel2
.
hidden
=
NO
;
}
}
if
([
text
isEqualToString
:
@"
\n
"
])
{
[
self
.
footerView
.
titleTextView
resignFirstResponder
];
[
self
.
footerView
.
contentTextView
resignFirstResponder
];
return
NO
;
}
return
YES
;
}
*/
@end
redstar/Classes/Module/Function/Question/QuestionDetail/ViewController/QuestionDetailViewController.m
View file @
3a2738ae
...
...
@@ -136,6 +136,7 @@
_commentView
.
backgroundColor
=
[
UIColor
whiteColor
];
}
_commentView
.
contentTextView
.
text
=
@""
;
_commentView
.
contentTextView
.
delegate
=
self
;
[
_commentView
.
quitBtn
addTarget
:
self
action
:
@selector
(
closeBackGroundView
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
_commentView
.
sureBtn
addTarget
:
self
action
:
@selector
(
submitComment
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
view
insertSubview
:
_backGroundView
aboveSubview
:
_tableView
];
...
...
@@ -160,6 +161,27 @@
}
-
(
void
)
textViewDidBeginEditing
:
(
UITextView
*
)
textView
{
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
_commentView
.
frame
=
CGRectMake
(
0
,
self
.
view
.
frame
.
size
.
height
-
kCommentViewHeight
-
173
,
kScreenWidth
,
kCommentViewHeight
);
}];
}
-
(
void
)
textViewDidEndEditing
:
(
UITextView
*
)
textView
{
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
_commentView
.
frame
=
CGRectMake
(
0
,
self
.
view
.
frame
.
size
.
height
-
kCommentViewHeight
,
kScreenWidth
,
kCommentViewHeight
);
}];
}
//-(void)textFieldDidBeginEditing:(UITextField *)textField
//{
//
//}
// 提交评论
-
(
void
)
submitComment
:
(
UIButton
*
)
sender
{
...
...
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectDetail/View/InspectDetailFooterView.h
View file @
3a2738ae
...
...
@@ -13,5 +13,5 @@
@property
(
nonatomic
,
strong
)
TakePhotoView
*
takePhotoView
;
@property
(
nonatomic
,
strong
)
UIButton
*
reportBtn
;
@property
(
nonatomic
,
strong
)
UITextView
*
contentTextView
;
@property
(
nonatomic
,
strong
)
UILabel
*
placeholderLabel2
;
@end
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectDetail/View/InspectDetailFooterView.m
View file @
3a2738ae
...
...
@@ -39,7 +39,7 @@
@property
(
nonatomic
,
strong
)
UILabel
*
pictureLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
introLabel
;
@property
(
nonatomic
,
strong
)
UIImageView
*
backImageView2
;
@property
(
nonatomic
,
strong
)
UILabel
*
placeholderLabel2
;
@end
@implementation
InspectDetailFooterView
...
...
@@ -81,22 +81,7 @@
}
-
(
BOOL
)
textView
:
(
UITextView
*
)
textView
shouldChangeTextInRange
:
(
NSRange
)
range
replacementText
:
(
NSString
*
)
text
{
if
(
!
[
text
isEqualToString
:
@""
])
{
_placeholderLabel2
.
hidden
=
YES
;
}
if
([
text
isEqualToString
:
@""
]
&&
range
.
location
==
0
&&
range
.
length
==
1
)
{
_placeholderLabel2
.
hidden
=
NO
;
}
if
([
text
isEqualToString
:
@"
\n
"
])
{
[
self
.
contentTextView
resignFirstResponder
];
return
NO
;
}
return
YES
;
}
-
(
UILabel
*
)
pictureLabel
{
...
...
@@ -172,7 +157,6 @@
if
(
!
_contentTextView
)
{
_contentTextView
=
[[
UITextView
alloc
]
init
];
_contentTextView
.
font
=
[
UIFont
systemFontOfSize
:
15
.
0
];
_contentTextView
.
delegate
=
self
;
_contentTextView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
self
.
backImageView2
addSubview
:
_contentTextView
];
...
...
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectDetail/ViewController/InspectNotUploadViewController.m
View file @
3a2738ae
...
...
@@ -18,12 +18,13 @@
#define kInspectNotUploadCell @"InspectNotUploadCell"
@interface
InspectNotUploadViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
,
UINavigationControllerDelegate
,
UIImagePickerControllerDelegate
,
TakePhotoViewDelegate
,
UIScrollViewDelegate
,
UIAlertViewDelegate
>
@interface
InspectNotUploadViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
,
UINavigationControllerDelegate
,
UIImagePickerControllerDelegate
,
TakePhotoViewDelegate
,
UIScrollViewDelegate
,
UIAlertViewDelegate
,
UITextViewDelegate
>
@property
(
nonatomic
,
strong
)
UITableView
*
tableView
;
@property
(
nonatomic
,
strong
)
InspectDetailFooterView
*
footerView
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
imageNameArray
;
@property
(
nonatomic
,
strong
)
NSLayoutConstraint
*
tableBottom
;
@property
(
nonatomic
,
strong
)
NSLayoutConstraint
*
tableTop
;
@end
...
...
@@ -311,8 +312,8 @@
_tableView
.
estimatedRowHeight
=
300
.
0
;
[
self
.
view
addSubview
:
_tableView
];
NSLayoutConstraint
*
tableTop
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
tableTop
];
self
.
tableTop
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
_
tableTop
];
NSLayoutConstraint
*
tableLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
tableLeft
];
...
...
@@ -320,8 +321,8 @@
NSLayoutConstraint
*
tableRight
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
tableRight
];
NSLayoutConstraint
*
tableBottom
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeBottom
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
tableBottom
];
self
.
tableBottom
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeBottom
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
_
tableBottom
];
}
return
_tableView
;
}
...
...
@@ -330,6 +331,7 @@
{
if
(
!
_footerView
)
{
_footerView
=
[[
InspectDetailFooterView
alloc
]
init
];
_footerView
.
contentTextView
.
delegate
=
self
;
}
return
_footerView
;
}
...
...
@@ -340,6 +342,42 @@
[
self
.
footerView
.
contentTextView
resignFirstResponder
];
}
}
-
(
void
)
textViewDidBeginEditing
:
(
UITextView
*
)
textView
{
self
.
tableTop
.
constant
=
-
216
;
self
.
tableBottom
.
constant
=
-
216
;
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
[
self
.
tableView
layoutIfNeeded
];
}];
}
-
(
void
)
textViewDidEndEditing
:
(
UITextView
*
)
textView
{
self
.
tableTop
.
constant
=
0
;
self
.
tableBottom
.
constant
=
0
;
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
[
self
.
tableView
layoutIfNeeded
];
}];
}
-
(
BOOL
)
textView
:
(
UITextView
*
)
textView
shouldChangeTextInRange
:
(
NSRange
)
range
replacementText
:
(
NSString
*
)
text
{
if
(
!
[
text
isEqualToString
:
@""
])
{
self
.
footerView
.
placeholderLabel2
.
hidden
=
YES
;
}
if
([
text
isEqualToString
:
@""
]
&&
range
.
location
==
0
&&
range
.
length
==
1
)
{
self
.
footerView
.
placeholderLabel2
.
hidden
=
NO
;
}
if
([
text
isEqualToString
:
@"
\n
"
])
{
[
self
.
footerView
.
contentTextView
resignFirstResponder
];
return
NO
;
}
return
YES
;
}
/*
#pragma mark - Navigation
...
...
redstar/Classes/Module/Function/WordOfMouth/Ranking/RankDetail/ViewController/RankDetailViewController.m
View file @
3a2738ae
...
...
@@ -24,7 +24,7 @@
#define kRankDetailCell @"RankDetailTableCell"
@interface
RankDetailViewController
()
<
UITableViewDataSource
,
UITableViewDelegate
,
RankHeadViewDelegate
>
@interface
RankDetailViewController
()
<
UITableViewDataSource
,
UITableViewDelegate
,
RankHeadViewDelegate
,
UITextViewDelegate
>
@property
(
nonatomic
,
strong
)
UITableView
*
tableView
;
@property
(
nonatomic
,
strong
)
RankDetailHeaderView
*
rankDetailHeaderView
;
...
...
@@ -89,6 +89,8 @@
// Dispose of any resources that can be recreated.
}
#pragma mark - Private Methods
-
(
void
)
requestRankingDetail
...
...
@@ -136,6 +138,7 @@
_commentView
.
backgroundColor
=
[
UIColor
whiteColor
];
}
_commentView
.
contentTextView
.
text
=
@""
;
_commentView
.
contentTextView
.
delegate
=
self
;
[
_commentView
.
quitBtn
addTarget
:
self
action
:
@selector
(
closeBackGroundView
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
_commentView
.
sureBtn
addTarget
:
self
action
:
@selector
(
submitComment
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
view
insertSubview
:
_backGroundView
aboveSubview
:
_tableView
];
...
...
@@ -160,6 +163,20 @@
}
-
(
void
)
textViewDidBeginEditing
:
(
UITextView
*
)
textView
{
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
_commentView
.
frame
=
CGRectMake
(
0
,
self
.
view
.
frame
.
size
.
height
-
kCommentViewHeight
-
173
,
kScreenWidth
,
kCommentViewHeight
);
}];
}
-
(
void
)
textViewDidEndEditing
:
(
UITextView
*
)
textView
{
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
_commentView
.
frame
=
CGRectMake
(
0
,
self
.
view
.
frame
.
size
.
height
-
kCommentViewHeight
,
kScreenWidth
,
kCommentViewHeight
);
}];
}
// 提交评论
-
(
void
)
submitComment
:
(
UIButton
*
)
sender
...
...
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