Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
D
Dolphins
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lmj
Dolphins
Commits
826ca8ae
Commit
826ca8ae
authored
Jul 31, 2020
by
zhangguangyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update time
parent
a7976e2b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
3 deletions
+15
-3
.DS_Store
.DS_Store
+0
-0
UserInterfaceState.xcuserstate
...a/zhangguangyi.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
QFTimePickerView.m
Dolphins/Classes/Reminder/Others/QFTimePickerView.m
+15
-3
No files found.
.DS_Store
View file @
826ca8ae
No preview for this file type
Dolphins.xcworkspace/xcuserdata/zhangguangyi.xcuserdatad/UserInterfaceState.xcuserstate
View file @
826ca8ae
No preview for this file type
Dolphins/Classes/Reminder/Others/QFTimePickerView.m
View file @
826ca8ae
...
...
@@ -160,10 +160,22 @@
pickerView
.
dataSource
=
self
;
pickerView
.
backgroundColor
=
[
UIColor
whiteColor
];
NSDate
*
currentDate
=
[
NSDate
date
];
NSCalendar
*
currentCalendar
=
[
NSCalendar
currentCalendar
];
NSUInteger
integer
=
NSCalendarUnitYear
|
NSCalendarUnitMonth
|
NSCalendarUnitDay
|
NSCalendarUnitHour
|
NSCalendarUnitMinute
|
NSCalendarUnitSecond
;
NSDateComponents
*
dataCom
=
[
currentCalendar
components
:
integer
fromDate
:
currentDate
];
NSInteger
hour
=
[
dataCom
hour
];
NSInteger
minute
=
[
dataCom
minute
];
//设置pickerView默认第一行 这里也可默认选中其他行 修改selectRow即可
[
pickerView
selectRow
:
0
inComponent
:
0
animated
:
YES
];
[
pickerView
selectRow
:
0
inComponent
:
1
animated
:
YES
];
if
(
hour
<
24
&&
minute
<
60
)
{
[
pickerView
selectRow
:
hour
inComponent
:
0
animated
:
YES
];
[
pickerView
selectRow
:
minute
inComponent
:
1
animated
:
YES
];
selectedHour
=
hourArray
[
hour
];
selectedMin
=
minArray
[
minute
];
}
else
{
[
pickerView
selectRow
:
0
inComponent
:
0
animated
:
YES
];
[
pickerView
selectRow
:
0
inComponent
:
1
animated
:
YES
];
}
[
contentView
addSubview
:
pickerView
];
}
...
...
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