Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
X
xffruit
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
张杰
xffruit
Commits
8b2e7a8c
Commit
8b2e7a8c
authored
9 years ago
by
freecui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
登录页
parent
a374661b
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
172 additions
and
12 deletions
+172
-12
ICRLoginContentView.m
XFFruit/General/Views/ICRLoginContentView.m
+66
-11
Contents.json
XFFruit/Images.xcassets/Contents.json
+6
-0
Contents.json
XFFruit/Images.xcassets/登录页/Contents.json
+7
-0
Contents.json
XFFruit/Images.xcassets/登录页/logo.imageset/Contents.json
+23
-0
logo.png
XFFruit/Images.xcassets/登录页/logo.imageset/logo.png
+0
-0
logo@2x.png
XFFruit/Images.xcassets/登录页/logo.imageset/logo@2x.png
+0
-0
Contents.json
XFFruit/Images.xcassets/登录页/password.imageset/Contents.json
+23
-0
password.png
XFFruit/Images.xcassets/登录页/password.imageset/password.png
+0
-0
password@2x.png
...uit/Images.xcassets/登录页/password.imageset/password@2x.png
+0
-0
Contents.json
XFFruit/Images.xcassets/登录页/profile.imageset/Contents.json
+23
-0
profile.png
XFFruit/Images.xcassets/登录页/profile.imageset/profile.png
+0
-0
profile@2x.png
XFFruit/Images.xcassets/登录页/profile.imageset/profile@2x.png
+0
-0
Contents.json
XFFruit/Images.xcassets/登录页/公司识别码.imageset/Contents.json
+23
-0
公司识别码.png
XFFruit/Images.xcassets/登录页/公司识别码.imageset/公司识别码.png
+0
-0
公司识别码@2x.png
XFFruit/Images.xcassets/登录页/公司识别码.imageset/公司识别码@2x.png
+0
-0
ICRLoginViewController.m
XFFruit/ViewControllers/Login/ICRLoginViewController.m
+1
-1
No files found.
XFFruit/General/Views/ICRLoginContentView.m
View file @
8b2e7a8c
...
@@ -9,7 +9,8 @@
...
@@ -9,7 +9,8 @@
#import "ICRLoginContentView.h"
#import "ICRLoginContentView.h"
#import "ICRCheckBox.h"
#import "ICRCheckBox.h"
#define LOGIN_ICON_WIDTH (60)
#define LOGIN_ICON_WIDTH (156)
#define LOGIN_ICON_HEIGHT (44)
#define LOGIN_INNER_GAP (20)
#define LOGIN_INNER_GAP (20)
#define LOGIN_INPUT_HEIGHT (50)
#define LOGIN_INPUT_HEIGHT (50)
...
@@ -75,6 +76,52 @@
...
@@ -75,6 +76,52 @@
return
v
;
return
v
;
}
}
+
(
UIView
*
)
p_textFWithLeftImgView
:(
NSString
*
)
nsLeftImgName
textF
:(
UITextField
*
__autoreleasing
*
)
textFPointer
{
UIView
*
v
=
[[
UIView
alloc
]
init
];
v
.
backgroundColor
=
[
UIColor
clearColor
];
UIImageView
*
txtFBG
=
[[
UIImageView
alloc
]
initWithFrame
:
v
.
bounds
];
txtFBG
.
userInteractionEnabled
=
YES
;
txtFBG
.
image
=
[[
UIImage
imageNamed
:
@"LoginInputBG"
]
stretchableImageWithLeftCapWidth
:
10
topCapHeight
:
25
];
[
txtFBG
autoresizingWithStrechFullSize
];
[
v
addSubview
:
txtFBG
];
// IBTUILabel *leftLabel = [[IBTUILabel alloc] init];
// leftLabel.font = [UIFont systemFontOfSize:16];
// leftLabel.text = nsLeftLabel;
// [leftLabel sizeToFit];
// leftLabel.x = LOGIN_LABEL_MARGIN;
UIImageView
*
leftImgV
=
[[
UIImageView
alloc
]
initWithImage
:[
UIImage
imageNamed
:
nsLeftImgName
]];
leftImgV
.
frame
=
CGRectMake
(
5
,
0
,
19
,
22
);
UIView
*
labelContainer
=
[[
UIView
alloc
]
init
];
labelContainer
.
backgroundColor
=
[
UIColor
clearColor
];
labelContainer
.
frame
=
(
CGRect
){
.
origin
.
x
=
0
,
.
origin
.
y
=
0
,
.
size
.
width
=
leftImgV
.
width
+
1
*
LOGIN_LABEL_MARGIN
,
//leftLabel.width + 2 * LOGIN_LABEL_MARGIN,
.
size
.
height
=
leftImgV
.
height
//leftLabel.height
};
[
labelContainer
addSubview
:
leftImgV
];
UITextField
*
txtF
=
[[
UITextField
alloc
]
initWithFrame
:
txtFBG
.
bounds
];
txtF
.
leftViewMode
=
UITextFieldViewModeAlways
;
txtF
.
leftView
=
labelContainer
;
[
txtF
autoresizingWithStrechFullSize
];
[
v
addSubview
:
txtF
];
if
(
textFPointer
)
{
*
textFPointer
=
txtF
;
}
return
v
;
}
#pragma mark - Life Cycle
#pragma mark - Life Cycle
-
(
instancetype
)
initWithFrame
:(
CGRect
)
frame
-
(
instancetype
)
initWithFrame
:(
CGRect
)
frame
showCCode
:(
BOOL
)
bNeedShowCCode
showCCode
:(
BOOL
)
bNeedShowCCode
...
@@ -107,7 +154,7 @@
...
@@ -107,7 +154,7 @@
.
origin
.
x
=
(
self
.
width
-
LOGIN_ICON_WIDTH
)
*
.
5
f
,
.
origin
.
x
=
(
self
.
width
-
LOGIN_ICON_WIDTH
)
*
.
5
f
,
.
origin
.
y
=
0
,
.
origin
.
y
=
0
,
.
size
.
width
=
LOGIN_ICON_WIDTH
,
.
size
.
width
=
LOGIN_ICON_WIDTH
,
.
size
.
height
=
LOGIN_ICON_WIDTH
.
size
.
height
=
LOGIN_ICON_
HEIGHT
//LOGIN_ICON_
WIDTH
};
};
self
.
m_titleLabel
.
frame
=
(
CGRect
){
self
.
m_titleLabel
.
frame
=
(
CGRect
){
...
@@ -170,33 +217,41 @@
...
@@ -170,33 +217,41 @@
-
(
void
)
initSubviews
{
-
(
void
)
initSubviews
{
self
.
m_iconView
=
[[
UIImageView
alloc
]
init
];
self
.
m_iconView
=
[[
UIImageView
alloc
]
init
];
_m_iconView
.
image
=
[
IBTCommon
appIcon
];
_m_iconView
.
image
=
[
UIImage
imageNamed
:
@"logo"
];
//[
IBTCommon appIcon];
[
self
addSubview
:
_m_iconView
];
[
self
addSubview
:
_m_iconView
];
self
.
m_titleLabel
=
[[
IBTUILabel
alloc
]
init
];
self
.
m_titleLabel
=
[[
IBTUILabel
alloc
]
init
];
self
.
m_titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
19
.
0
f
];
self
.
m_titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
19
.
0
f
];
self
.
m_titleLabel
.
textColor
=
[
UIColor
whiteColor
];
self
.
m_titleLabel
.
textColor
=
[
UIColor
whiteColor
];
self
.
m_titleLabel
.
textAlignment
=
NSTextAlignmentCenter
;
self
.
m_titleLabel
.
textAlignment
=
NSTextAlignmentCenter
;
self
.
m_titleLabel
.
text
=
[
IBTCommon
localizableString
:
@"XFFruit"
];
self
.
m_titleLabel
.
text
=
@"移动管理平台"
;
//
[IBTCommon localizableString:@"XFFruit"];
[
self
addSubview
:
_m_titleLabel
];
[
self
addSubview
:
_m_titleLabel
];
UITextField
*
txtF
=
nil
;
UITextField
*
txtF
=
nil
;
// self.m_cCodeView =
// [[self class] TextFWithLeftLabel:[[IBTCommon localizableString:@"CompanyCode"] stringByAppendingString:@":"]
// textF:&txtF];
self
.
m_cCodeView
=
self
.
m_cCodeView
=
[[
self
class
]
TextFWithLeftLabel
:[[
IBTCommon
localizableString
:
@"CompanyCode"
]
stringByAppendingString
:
@":"
]
[[
self
class
]
p_textFWithLeftImgView
:
@"公司识别码"
textF
:
&
txtF
];
textF
:
&
txtF
];
self
.
m_cCodeTextF
=
txtF
;
self
.
m_cCodeTextF
=
txtF
;
[
self
addSubview
:
_m_cCodeView
];
[
self
addSubview
:
_m_cCodeView
];
// self.m_userNameView =
// [[self class] TextFWithLeftLabel:[[IBTCommon localizableString:@"User"] stringByAppendingString:@":"]
// textF:&txtF];
self
.
m_userNameView
=
self
.
m_userNameView
=
[[
self
class
]
TextFWithLeftLabel
:[[
IBTCommon
localizableString
:
@"User"
]
stringByAppendingString
:
@":"
]
[[
self
class
]
p_textFWithLeftImgView
:
@"profile"
textF
:
&
txtF
];
textF
:
&
txtF
];
self
.
m_userNameTextF
=
txtF
;
self
.
m_userNameTextF
=
txtF
;
[
self
addSubview
:
_m_userNameView
];
[
self
addSubview
:
_m_userNameView
];
// self.m_passwordView =
// [[self class] TextFWithLeftLabel:[[IBTCommon localizableString:@"Password"] stringByAppendingString:@":"]
// textF:&txtF];
self
.
m_passwordView
=
self
.
m_passwordView
=
[[
self
class
]
TextFWithLeftLabel
:[[
IBTCommon
localizableString
:
@"Password"
]
stringByAppendingString
:
@":"
]
[[
self
class
]
p_textFWithLeftImgView
:
@"password"
textF
:
&
txtF
];
textF
:
&
txtF
];
self
.
m_passwordTextF
=
txtF
;
self
.
m_passwordTextF
=
txtF
;
_m_passwordTextF
.
secureTextEntry
=
YES
;
_m_passwordTextF
.
secureTextEntry
=
YES
;
[
self
addSubview
:
_m_passwordView
];
[
self
addSubview
:
_m_passwordView
];
...
@@ -205,7 +260,7 @@
...
@@ -205,7 +260,7 @@
[
self
initCheckBox
];
[
self
initCheckBox
];
// button
// button
self
.
m_loginBtn
=
[
IBTUIButton
RoundCornerBtnWithTitle
:[
IBTCommon
localizableString
:
@"Login"
]
bgColor
:
nil
];
self
.
m_loginBtn
=
[
IBTUIButton
RoundCornerBtnWithTitle
:[
IBTCommon
localizableString
:
@"Login"
]
bgColor
:
GXF_ORIGIN_COLOR
];
[
self
.
m_loginBtn
setTitle
:[
IBTCommon
localizableString
:
@"Login"
]
[
self
.
m_loginBtn
setTitle
:[
IBTCommon
localizableString
:
@"Login"
]
forState
:
UIControlStateNormal
];
forState
:
UIControlStateNormal
];
[
self
addSubview
:
_m_loginBtn
];
[
self
addSubview
:
_m_loginBtn
];
...
...
This diff is collapsed.
Click to expand it.
XFFruit/Images.xcassets/Contents.json
0 → 100644
View file @
8b2e7a8c
{
"info"
:
{
"version"
:
1
,
"author"
:
"xcode"
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
XFFruit/Images.xcassets/登录页/Contents.json
0 → 100644
View file @
8b2e7a8c
{
"info"
:
{
"version"
:
1
,
"author"
:
"xcode"
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
XFFruit/Images.xcassets/登录页/logo.imageset/Contents.json
0 → 100644
View file @
8b2e7a8c
{
"images"
:
[
{
"idiom"
:
"universal"
,
"filename"
:
"logo.png"
,
"scale"
:
"1x"
},
{
"idiom"
:
"universal"
,
"filename"
:
"logo@2x.png"
,
"scale"
:
"2x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"version"
:
1
,
"author"
:
"xcode"
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
XFFruit/Images.xcassets/登录页/logo.imageset/logo.png
0 → 100644
View file @
8b2e7a8c
12.3 KB
This diff is collapsed.
Click to expand it.
XFFruit/Images.xcassets/登录页/logo.imageset/logo@2x.png
0 → 100644
View file @
8b2e7a8c
34.2 KB
This diff is collapsed.
Click to expand it.
XFFruit/Images.xcassets/登录页/password.imageset/Contents.json
0 → 100644
View file @
8b2e7a8c
{
"images"
:
[
{
"idiom"
:
"universal"
,
"filename"
:
"password.png"
,
"scale"
:
"1x"
},
{
"idiom"
:
"universal"
,
"filename"
:
"password@2x.png"
,
"scale"
:
"2x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"version"
:
1
,
"author"
:
"xcode"
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
XFFruit/Images.xcassets/登录页/password.imageset/password.png
0 → 100644
View file @
8b2e7a8c
1.14 KB
This diff is collapsed.
Click to expand it.
XFFruit/Images.xcassets/登录页/password.imageset/password@2x.png
0 → 100644
View file @
8b2e7a8c
1.36 KB
This diff is collapsed.
Click to expand it.
XFFruit/Images.xcassets/登录页/profile.imageset/Contents.json
0 → 100644
View file @
8b2e7a8c
{
"images"
:
[
{
"idiom"
:
"universal"
,
"filename"
:
"profile.png"
,
"scale"
:
"1x"
},
{
"idiom"
:
"universal"
,
"filename"
:
"profile@2x.png"
,
"scale"
:
"2x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"version"
:
1
,
"author"
:
"xcode"
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
XFFruit/Images.xcassets/登录页/profile.imageset/profile.png
0 → 100644
View file @
8b2e7a8c
1.3 KB
This diff is collapsed.
Click to expand it.
XFFruit/Images.xcassets/登录页/profile.imageset/profile@2x.png
0 → 100644
View file @
8b2e7a8c
1.76 KB
This diff is collapsed.
Click to expand it.
XFFruit/Images.xcassets/登录页/公司识别码.imageset/Contents.json
0 → 100644
View file @
8b2e7a8c
{
"images"
:
[
{
"idiom"
:
"universal"
,
"filename"
:
"公司识别码.png"
,
"scale"
:
"1x"
},
{
"idiom"
:
"universal"
,
"filename"
:
"公司识别码@2x.png"
,
"scale"
:
"2x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"version"
:
1
,
"author"
:
"xcode"
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
XFFruit/Images.xcassets/登录页/公司识别码.imageset/公司识别码.png
0 → 100644
View file @
8b2e7a8c
1.02 KB
This diff is collapsed.
Click to expand it.
XFFruit/Images.xcassets/登录页/公司识别码.imageset/公司识别码@2x.png
0 → 100644
View file @
8b2e7a8c
1.03 KB
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Login/ICRLoginViewController.m
View file @
8b2e7a8c
...
@@ -67,7 +67,7 @@
...
@@ -67,7 +67,7 @@
#pragma mark - Private Method
#pragma mark - Private Method
-
(
void
)
setupSubviews
{
-
(
void
)
setupSubviews
{
UIImageView
*
bg
=
[[
UIImageView
alloc
]
initWithFrame
:
self
.
view
.
bounds
];
UIImageView
*
bg
=
[[
UIImageView
alloc
]
initWithFrame
:
self
.
view
.
bounds
];
bg
.
image
=
[
UIImage
imageNamed
:
@"LoginBG"
];
bg
.
image
=
[
UIImage
image
WithColor
:
GXF_SAVE_COLOR
];
//[UIImage image
Named:@"LoginBG"];
[
bg
autoresizingWithStrechFullSize
];
[
bg
autoresizingWithStrechFullSize
];
UITapGestureRecognizer
*
tapGesture
=
UITapGestureRecognizer
*
tapGesture
=
...
...
This diff is collapsed.
Click to expand it.
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