Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
contactos-app
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Javier Heisecke
contactos-app
Commits
e2c874c1
You need to sign in or sign up before continuing.
Commit
e2c874c1
authored
Mar 27, 2020
by
Javier Heisekce
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Llama a numeros
parent
4c4ec645
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
19 deletions
+13
-19
ContactsApp/Base.lproj/Main.storyboard
+5
-15
ContactsApp/Info.plist
+3
-3
ContactsApp/SingleContactViewController.swift
+5
-1
No files found.
ContactsApp/Base.lproj/Main.storyboard
View file @
e2c874c1
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB"
version=
"3.0"
toolsVersion=
"1
5705
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
initialViewController=
"PED-ba-Jdi"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB"
version=
"3.0"
toolsVersion=
"1
6096
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
initialViewController=
"PED-ba-Jdi"
>
<device
id=
"retina4_7"
orientation=
"portrait"
appearance=
"light"
/>
<device
id=
"retina4_7"
orientation=
"portrait"
appearance=
"light"
/>
<dependencies>
<dependencies>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1
570
6"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1
608
6"
/>
<capability
name=
"Safe area layout guides"
minToolsVersion=
"9.0"
/>
<capability
name=
"Safe area layout guides"
minToolsVersion=
"9.0"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
</dependencies>
</dependencies>
...
@@ -77,13 +77,6 @@
...
@@ -77,13 +77,6 @@
<nil
key=
"textColor"
/>
<nil
key=
"textColor"
/>
<nil
key=
"highlightedColor"
/>
<nil
key=
"highlightedColor"
/>
</label>
</label>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"roundedRect"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"eBo-CT-x9g"
>
<rect
key=
"frame"
x=
"58"
y=
"212"
width=
"30"
height=
"30"
/>
<state
key=
"normal"
title=
"Call"
/>
<connections>
<action
selector=
"callButton:"
destination=
"i2T-MY-6qf"
eventType=
"touchUpInside"
id=
"nXp-Mk-RCH"
/>
</connections>
</button>
<label
hidden=
"YES"
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"mobile"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"KxJ-Qv-kA7"
>
<label
hidden=
"YES"
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"mobile"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"KxJ-Qv-kA7"
>
<rect
key=
"frame"
x=
"16"
y=
"240"
width=
"44"
height=
"17"
/>
<rect
key=
"frame"
x=
"16"
y=
"240"
width=
"44"
height=
"17"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"14"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"14"
/>
...
@@ -94,7 +87,7 @@
...
@@ -94,7 +87,7 @@
<rect
key=
"frame"
x=
"16"
y=
"259"
width=
"111"
height=
"30"
/>
<rect
key=
"frame"
x=
"16"
y=
"259"
width=
"111"
height=
"30"
/>
<state
key=
"normal"
title=
"(888) 555-5512"
/>
<state
key=
"normal"
title=
"(888) 555-5512"
/>
<connections>
<connections>
<action
selector=
"call
Button:"
destination=
"i2T-MY-6qf"
eventType=
"touchUpInside"
id=
"H4b-52-ngQ
"
/>
<action
selector=
"call
SpecificNumber:"
destination=
"i2T-MY-6qf"
eventType=
"touchUpInside"
id=
"FHq-SH-TBR
"
/>
</connections>
</connections>
</button>
</button>
<label
hidden=
"YES"
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"mobile"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"vQF-Eq-KWL"
>
<label
hidden=
"YES"
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"mobile"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"vQF-Eq-KWL"
>
...
@@ -107,7 +100,7 @@
...
@@ -107,7 +100,7 @@
<rect
key=
"frame"
x=
"18"
y=
"316"
width=
"111"
height=
"30"
/>
<rect
key=
"frame"
x=
"18"
y=
"316"
width=
"111"
height=
"30"
/>
<state
key=
"normal"
title=
"(888) 555-5512"
/>
<state
key=
"normal"
title=
"(888) 555-5512"
/>
<connections>
<connections>
<action
selector=
"call
Button:"
destination=
"i2T-MY-6qf"
eventType=
"touchUpInside"
id=
"xgn-e5-2aF
"
/>
<action
selector=
"call
SpecificNumber:"
destination=
"i2T-MY-6qf"
eventType=
"touchUpInside"
id=
"f9Y-mD-DTh
"
/>
</connections>
</connections>
</button>
</button>
</subviews>
</subviews>
...
@@ -116,15 +109,12 @@
...
@@ -116,15 +109,12 @@
<constraint
firstItem=
"YV1-WY-lTn"
firstAttribute=
"trailing"
relation=
"greaterThanOrEqual"
secondItem=
"m4m-IH-dYv"
secondAttribute=
"trailing"
symbolic=
"YES"
id=
"1AC-tb-Lsi"
/>
<constraint
firstItem=
"YV1-WY-lTn"
firstAttribute=
"trailing"
relation=
"greaterThanOrEqual"
secondItem=
"m4m-IH-dYv"
secondAttribute=
"trailing"
symbolic=
"YES"
id=
"1AC-tb-Lsi"
/>
<constraint
firstItem=
"SSh-qK-Te0"
firstAttribute=
"leading"
secondItem=
"YV1-WY-lTn"
secondAttribute=
"leading"
constant=
"137"
id=
"5ra-OQ-OXE"
/>
<constraint
firstItem=
"SSh-qK-Te0"
firstAttribute=
"leading"
secondItem=
"YV1-WY-lTn"
secondAttribute=
"leading"
constant=
"137"
id=
"5ra-OQ-OXE"
/>
<constraint
firstItem=
"78U-Dh-WFs"
firstAttribute=
"top"
secondItem=
"vQF-Eq-KWL"
secondAttribute=
"bottom"
constant=
"2"
id=
"7Qu-oy-WiY"
/>
<constraint
firstItem=
"78U-Dh-WFs"
firstAttribute=
"top"
secondItem=
"vQF-Eq-KWL"
secondAttribute=
"bottom"
constant=
"2"
id=
"7Qu-oy-WiY"
/>
<constraint
firstItem=
"KxJ-Qv-kA7"
firstAttribute=
"top"
secondItem=
"eBo-CT-x9g"
secondAttribute=
"bottom"
constant=
"-2"
id=
"AbZ-R1-uip"
/>
<constraint
firstItem=
"eBo-CT-x9g"
firstAttribute=
"top"
secondItem=
"1Kw-mC-GdR"
secondAttribute=
"bottom"
constant=
"8"
id=
"AqY-Nn-a6x"
/>
<constraint
firstItem=
"vQF-Eq-KWL"
firstAttribute=
"leading"
secondItem=
"YV1-WY-lTn"
secondAttribute=
"leading"
constant=
"18"
id=
"I0k-GE-QJ0"
/>
<constraint
firstItem=
"vQF-Eq-KWL"
firstAttribute=
"leading"
secondItem=
"YV1-WY-lTn"
secondAttribute=
"leading"
constant=
"18"
id=
"I0k-GE-QJ0"
/>
<constraint
firstItem=
"KxJ-Qv-kA7"
firstAttribute=
"top"
secondItem=
"1Kw-mC-GdR"
secondAttribute=
"bottom"
constant=
"36"
id=
"JYe-UB-gvm"
/>
<constraint
firstItem=
"YV1-WY-lTn"
firstAttribute=
"trailing"
relation=
"greaterThanOrEqual"
secondItem=
"78U-Dh-WFs"
secondAttribute=
"trailing"
symbolic=
"YES"
id=
"KQY-U5-hvm"
/>
<constraint
firstItem=
"YV1-WY-lTn"
firstAttribute=
"trailing"
relation=
"greaterThanOrEqual"
secondItem=
"78U-Dh-WFs"
secondAttribute=
"trailing"
symbolic=
"YES"
id=
"KQY-U5-hvm"
/>
<constraint
firstItem=
"1Kw-mC-GdR"
firstAttribute=
"top"
secondItem=
"SSh-qK-Te0"
secondAttribute=
"bottom"
constant=
"8"
id=
"Ktz-1f-c23"
/>
<constraint
firstItem=
"1Kw-mC-GdR"
firstAttribute=
"top"
secondItem=
"SSh-qK-Te0"
secondAttribute=
"bottom"
constant=
"8"
id=
"Ktz-1f-c23"
/>
<constraint
firstItem=
"m4m-IH-dYv"
firstAttribute=
"leading"
secondItem=
"YV1-WY-lTn"
secondAttribute=
"leading"
constant=
"16"
id=
"Ky9-D3-Q8g"
/>
<constraint
firstItem=
"m4m-IH-dYv"
firstAttribute=
"leading"
secondItem=
"YV1-WY-lTn"
secondAttribute=
"leading"
constant=
"16"
id=
"Ky9-D3-Q8g"
/>
<constraint
firstItem=
"vQF-Eq-KWL"
firstAttribute=
"top"
secondItem=
"m4m-IH-dYv"
secondAttribute=
"bottom"
constant=
"8"
id=
"NnL-pe-PyE"
/>
<constraint
firstItem=
"vQF-Eq-KWL"
firstAttribute=
"top"
secondItem=
"m4m-IH-dYv"
secondAttribute=
"bottom"
constant=
"8"
id=
"NnL-pe-PyE"
/>
<constraint
firstItem=
"eBo-CT-x9g"
firstAttribute=
"leading"
secondItem=
"1Kw-mC-GdR"
secondAttribute=
"leading"
id=
"P95-3L-FTz"
/>
<constraint
firstItem=
"YV1-WY-lTn"
firstAttribute=
"trailing"
relation=
"greaterThanOrEqual"
secondItem=
"eBo-CT-x9g"
secondAttribute=
"trailing"
symbolic=
"YES"
id=
"S0r-tt-H4L"
/>
<constraint
firstItem=
"YV1-WY-lTn"
firstAttribute=
"trailing"
secondItem=
"SSh-qK-Te0"
secondAttribute=
"trailing"
constant=
"138"
id=
"SoA-lc-Ayp"
/>
<constraint
firstItem=
"YV1-WY-lTn"
firstAttribute=
"trailing"
secondItem=
"SSh-qK-Te0"
secondAttribute=
"trailing"
constant=
"138"
id=
"SoA-lc-Ayp"
/>
<constraint
firstItem=
"m4m-IH-dYv"
firstAttribute=
"top"
secondItem=
"KxJ-Qv-kA7"
secondAttribute=
"bottom"
constant=
"2"
id=
"cXc-j4-79C"
/>
<constraint
firstItem=
"m4m-IH-dYv"
firstAttribute=
"top"
secondItem=
"KxJ-Qv-kA7"
secondAttribute=
"bottom"
constant=
"2"
id=
"cXc-j4-79C"
/>
<constraint
firstItem=
"78U-Dh-WFs"
firstAttribute=
"leading"
secondItem=
"YV1-WY-lTn"
secondAttribute=
"leading"
constant=
"18"
id=
"cc2-xi-9qt"
/>
<constraint
firstItem=
"78U-Dh-WFs"
firstAttribute=
"leading"
secondItem=
"YV1-WY-lTn"
secondAttribute=
"leading"
constant=
"18"
id=
"cc2-xi-9qt"
/>
...
...
ContactsApp/Info.plist
View file @
e2c874c1
...
@@ -2,8 +2,6 @@
...
@@ -2,8 +2,6 @@
<
!
D
O
C
TYP
E
plist
PU
B
LI
C
"-//
A
ppl
e
//
D
T
D
PLIST
1
.
0
//
E
N"
"http://www.
a
ppl
e
.
c
om/
D
T
D
s/Prop
e
rtyList-
1
.
0
.
d
t
d
"
>
<
!
D
O
C
TYP
E
plist
PU
B
LI
C
"-//
A
ppl
e
//
D
T
D
PLIST
1
.
0
//
E
N"
"http://www.
a
ppl
e
.
c
om/
D
T
D
s/Prop
e
rtyList-
1
.
0
.
d
t
d
"
>
<
plist
v
e
rsion="
1
.
0
"
>
<
plist
v
e
rsion="
1
.
0
"
>
<
d
i
c
t
>
<
d
i
c
t
>
<
k
e
y
>
NSContactsUsageDescription
<
/k
e
y
>
<
string
>
Voy
a
spamear
a
tus
contactos
<
/string
>
<
k
e
y
>
CFBundleDevelopmentRegion
<
/k
e
y
>
<
k
e
y
>
CFBundleDevelopmentRegion
<
/k
e
y
>
<
string
>
$
(
DEVELOPMENT_LANGUAGE
)<
/string
>
<
string
>
$
(
DEVELOPMENT_LANGUAGE
)<
/string
>
<
k
e
y
>
CFBundleExecutable
<
/k
e
y
>
<
k
e
y
>
CFBundleExecutable
<
/k
e
y
>
...
@@ -22,6 +20,8 @@
...
@@ -22,6 +20,8 @@
<
string
>
1
<
/string
>
<
string
>
1
<
/string
>
<
k
e
y
>
LSRequiresIPhoneOS
<
/k
e
y
>
<
k
e
y
>
LSRequiresIPhoneOS
<
/k
e
y
>
<
tru
e
/
>
<
tru
e
/
>
<
k
e
y
>
NSContactsUsageDescription
<
/k
e
y
>
<
string
>
Voy
a
spamear
a
tus
contactos
<
/string
>
<
k
e
y
>
UIApplicationSceneManifest
<
/k
e
y
>
<
k
e
y
>
UIApplicationSceneManifest
<
/k
e
y
>
<
d
i
c
t
>
<
d
i
c
t
>
<
k
e
y
>
UIApplicationSupportsMultipleScenes
<
/k
e
y
>
<
k
e
y
>
UIApplicationSupportsMultipleScenes
<
/k
e
y
>
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
k
e
y
>
UILaunchStoryboardName
<
/k
e
y
>
<
k
e
y
>
UILaunchStoryboardName
<
/k
e
y
>
<
string
>
LaunchScree
n
<
/string
>
<
string
>
Mai
n
<
/string
>
<
k
e
y
>
UIMainStoryboardFile
<
/k
e
y
>
<
k
e
y
>
UIMainStoryboardFile
<
/k
e
y
>
<
string
>
Main
<
/string
>
<
string
>
Main
<
/string
>
<
k
e
y
>
UIRequiredDeviceCapabilities
<
/k
e
y
>
<
k
e
y
>
UIRequiredDeviceCapabilities
<
/k
e
y
>
...
...
ContactsApp/SingleContactViewController.swift
View file @
e2c874c1
...
@@ -21,7 +21,7 @@ class SingleContactViewController: UIViewController {
...
@@ -21,7 +21,7 @@ class SingleContactViewController: UIViewController {
override
func
viewDidLoad
()
{
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
super
.
viewDidLoad
()
if
let
contact
=
selectedContact
{
if
let
contact
=
selectedContact
{
title
=
"
\(
contact
.
givenName
)
\(
contact
.
familyName
)
"
title
=
"
\(
contact
.
givenName
)
\(
contact
.
familyName
)
"
contactFullname
.
text
=
"
\(
contact
.
givenName
)
\(
contact
.
familyName
)
"
contactFullname
.
text
=
"
\(
contact
.
givenName
)
\(
contact
.
familyName
)
"
if
let
phones
=
contact
.
phoneNumbers
.
first
{
if
let
phones
=
contact
.
phoneNumbers
.
first
{
...
@@ -48,6 +48,10 @@ class SingleContactViewController: UIViewController {
...
@@ -48,6 +48,10 @@ class SingleContactViewController: UIViewController {
}
}
@IBAction
func
callButton
(
_
sender
:
Any
)
{
@IBAction
func
callButton
(
_
sender
:
Any
)
{
guard
let
number
=
URL
(
string
:
"tel://"
+
(
selectedContact
!.
phoneNumbers
.
first
?
.
value
.
stringValue
)
!
)
else
{
return
}
UIApplication
.
shared
.
open
(
number
)
}
}
@IBAction
func
callSpecificNumber
(
_
sender
:
Any
)
{
}
}
}
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