Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
3b32d72e
Commit
3b32d72e
authored
11 years ago
by
Maxime Graulich
Browse files
Options
Downloads
Patches
Plain Diff
Add UITextFieldDelegate in PostProcessingViewController
parent
4f8dc340
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
contrib/mobile/iOS/Onelab/PostProcessingViewController.h
+1
-1
1 addition, 1 deletion
contrib/mobile/iOS/Onelab/PostProcessingViewController.h
contrib/mobile/iOS/Onelab/PostProcessingViewController.mm
+25
-0
25 additions, 0 deletions
contrib/mobile/iOS/Onelab/PostProcessingViewController.mm
with
26 additions
and
1 deletion
contrib/mobile/iOS/Onelab/PostProcessingViewController.h
+
1
−
1
View file @
3b32d72e
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
#include
<gmsh/PViewData.h>
#include
<gmsh/PViewData.h>
#include
<gmsh/PViewOptions.h>
#include
<gmsh/PViewOptions.h>
@interface
PostProcessingViewController
:
UIViewController
<
UIPickerViewDataSource
,
UIPickerViewDelegate
>
@interface
PostProcessingViewController
:
UIViewController
<
UIPickerViewDataSource
,
UIPickerViewDelegate
,
UITextFieldDelegate
>
{
{
@private
@private
PView
*
_pview
;
PView
*
_pview
;
...
...
This diff is collapsed.
Click to expand it.
contrib/mobile/iOS/Onelab/PostProcessingViewController.mm
+
25
−
0
View file @
3b32d72e
...
@@ -39,6 +39,15 @@
...
@@ -39,6 +39,15 @@
[
_IntervalsType
setDelegate
:
self
];
[
_IntervalsType
setDelegate
:
self
];
[
_IntervalsType
selectRow
:
_pview
->
getOptions
()
->
intervalsType
-
1
inComponent
:
0
animated
:
YES
];
[
_IntervalsType
selectRow
:
_pview
->
getOptions
()
->
intervalsType
-
1
inComponent
:
0
animated
:
YES
];
[
_Intervals
setText
:[
NSString
stringWithFormat
:
@"%d"
,
_pview
->
getOptions
()
->
nbIso
]];
[
_Intervals
setText
:[
NSString
stringWithFormat
:
@"%d"
,
_pview
->
getOptions
()
->
nbIso
]];
UIToolbar
*
numberToolbar
=
[[
UIToolbar
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
320
,
50
)];
numberToolbar
.
barStyle
=
UIBarStyleBlackTranslucent
;
numberToolbar
.
items
=
[
NSArray
arrayWithObjects
:
[[
UIBarButtonItem
alloc
]
initWithBarButtonSystemItem
:
UIBarButtonSystemItemFlexibleSpace
target
:
nil
action
:
nil
],
[[
UIBarButtonItem
alloc
]
initWithTitle
:
@"Done"
style
:
UIBarButtonItemStyleDone
target
:
self
action
:
@selector
(
doneWithNumberPad
)],
nil
];
[
numberToolbar
sizeToFit
];
_Intervals
.
delegate
=
self
;
_Intervals
.
inputAccessoryView
=
numberToolbar
;
[
_RaiseZ
setValue
:
_pview
->
getOptions
()
->
raise
[
2
]];
[
_RaiseZ
setValue
:
_pview
->
getOptions
()
->
raise
[
2
]];
[
_RaiseZ
addTarget
:
self
action
:
@selector
(
slideRaiseZ
:
)
forControlEvents
:
UIControlEventValueChanged
];
[
_RaiseZ
addTarget
:
self
action
:
@selector
(
slideRaiseZ
:
)
forControlEvents
:
UIControlEventValueChanged
];
}
}
...
@@ -74,6 +83,22 @@
...
@@ -74,6 +83,22 @@
// Dispose of any resources that can be recreated.
// Dispose of any resources that can be recreated.
}
}
-
(
BOOL
)
textFieldShouldEndEditing
:(
UITextField
*
)
textField
{
_pview
->
getOptions
()
->
nbIso
=
[
textField
.
text
integerValue
];
_pview
->
setChanged
(
true
);
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
@"requestRender"
object
:
nil
];
return
YES
;
}
-
(
BOOL
)
textFieldShouldReturn
:(
UITextField
*
)
textField
{
return
[
_Intervals
endEditing
:
YES
];
}
-
(
void
)
doneWithNumberPad
{
[
_Intervals
endEditing
:
YES
];
}
-
(
void
)
viewDidUnload
{
-
(
void
)
viewDidUnload
{
[
self
setName
:
nil
];
[
self
setName
:
nil
];
[
self
setIntervalsType
:
nil
];
[
self
setIntervalsType
:
nil
];
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment