Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Andrew D'Abbraccio
PLUC Inventory - Senior Design
Commits
f608973e
Commit
f608973e
authored
Mar 22, 2015
by
Alex Moore
Browse files
Merging
parents
3ca6cc63
10ce7b38
Changes
5
Hide whitespace changes
Inline
Side-by-side
UI-Iteration3/.DS_Store
deleted
100644 → 0
View file @
3ca6cc63
File deleted
UI-Iteration3/PLUCdraft/.DS_Store
View file @
f608973e
No preview for this file type
UI-Iteration3/PLUCdraft/PLUCdraft/.DS_Store
View file @
f608973e
No preview for this file type
UI-Iteration3/PLUCdraft/PLUCdraft/Main.storyboard
View file @
f608973e
...
...
@@ -217,6 +217,7 @@
<textInputTraits
key=
"textInputTraits"
/>
<connections>
<action
selector=
"txtChange:"
destination=
"chc-VY-Gqa"
eventType=
"editingChanged"
id=
"8Fd-OM-q60"
/>
<action
selector=
"txtChange:"
destination=
"chc-VY-Gqa"
eventType=
"valueChanged"
id=
"rNI-lq-ipd"
/>
</connections>
</textField>
<tableView
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
alwaysBounceVertical=
"YES"
dataMode=
"prototypes"
style=
"plain"
separatorStyle=
"default"
allowsSelectionDuringEditing=
"YES"
rowHeight=
"44"
sectionHeaderHeight=
"22"
sectionFooterHeight=
"22"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"HXe-Ct-PRX"
>
...
...
UI-Iteration3/PLUCdraft/PLUCdraft/ScanBookViewController.m
View file @
f608973e
...
...
@@ -228,8 +228,8 @@ static int BOOK_ID_LENGTH = 14;
});
});
}
//31172001492867
-
(
IBAction
)
txtChange
:(
id
)
sender
{
-
(
void
)
barcodeTextChanged
{
NSCharacterSet
*
notDigits
=
[[
NSCharacterSet
decimalDigitCharacterSet
]
invertedSet
];
if
(
self
.
txtBookID
.
text
.
length
==
BOOK_ID_LENGTH
)
{
//string is proper length
if
([
self
.
txtBookID
.
text
rangeOfCharacterFromSet
:
notDigits
].
location
==
NSNotFound
)
{
//string is numeric
...
...
@@ -249,16 +249,16 @@ static int BOOK_ID_LENGTH = 14;
[
self
.
webview
stringByEvaluatingJavaScriptFromString
:
inputCode
];
[
self
.
webview
stringByEvaluatingJavaScriptFromString
:
scan
];
// //randomly generate errors
// int random = arc4random() % 10;
// if(random < 5) {
// //green check
// [self changeCheckImage];
//
// } else {
// //red x
// [self changeXImage];
// }
// //randomly generate errors
// int random = arc4random() % 10;
// if(random < 5) {
// //green check
// [self changeCheckImage];
//
// } else {
// //red x
// [self changeXImage];
// }
NSLog
(
@"ID accepted"
);
self
.
view
.
backgroundColor
=
[
UIColor
greenColor
];
[
UIView
animateWithDuration
:
1
.
0
animations
:
^
{
...
...
@@ -282,7 +282,7 @@ static int BOOK_ID_LENGTH = 14;
// delegate:self
// cancelButtonTitle:@"OK"
// otherButtonTitles:nil];
//
//
// [previousScan show];
[
self
extractInformation
:
scanned
];
}
else
{
...
...
@@ -296,6 +296,16 @@ static int BOOK_ID_LENGTH = 14;
}
}
//31172001492867
-
(
IBAction
)
txtChange
:(
id
)
sender
{
[
self
barcodeTextChanged
];
}
-
(
void
)
decoderDataReceived
:(
NSString
*
)
data
{
[
super
decoderDataReceived
:
data
];
[
self
barcodeTextChanged
];
}
-
(
IBAction
)
clickedFinish
:(
id
)
sender
{
NSString
*
path
=
[[
NSBundle
mainBundle
]
pathForResource
:
@"WhatPage"
ofType
:
@"js"
];
...
...
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