Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 82c60c4

Browse files
View를 Storyboard가 아닌 코드로 추가하는 방식으로 변경
1 parent 1fe56b9 commit 82c60c4

File tree

7 files changed

+112
-8
lines changed

7 files changed

+112
-8
lines changed

‎VFL.xcodeproj/project.pbxproj‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@
287287
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
288288
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
289289
CODE_SIGN_STYLE = Automatic;
290+
DEVELOPMENT_TEAM = 5HZQ3M82FA;
290291
INFOPLIST_FILE = VFL/Info.plist;
291292
LD_RUNPATH_SEARCH_PATHS = (
292293
"$(inherited)",
@@ -305,6 +306,7 @@
305306
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
306307
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
307308
CODE_SIGN_STYLE = Automatic;
309+
DEVELOPMENT_TEAM = 5HZQ3M82FA;
308310
INFOPLIST_FILE = VFL/Info.plist;
309311
LD_RUNPATH_SEARCH_PATHS = (
310312
"$(inherited)",
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"images" : [
3+
{
4+
"filename" : "apple.png",
5+
"idiom" : "universal",
6+
"scale" : "1x"
7+
},
8+
{
9+
"idiom" : "universal",
10+
"scale" : "2x"
11+
},
12+
{
13+
"idiom" : "universal",
14+
"scale" : "3x"
15+
}
16+
],
17+
"info" : {
18+
"author" : "xcode",
19+
"version" : 1
20+
}
21+
}
30.4 KB
Loading[フレーム]
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"images" : [
3+
{
4+
"filename" : "swift.png",
5+
"idiom" : "universal",
6+
"scale" : "1x"
7+
},
8+
{
9+
"idiom" : "universal",
10+
"scale" : "2x"
11+
},
12+
{
13+
"idiom" : "universal",
14+
"scale" : "3x"
15+
}
16+
],
17+
"info" : {
18+
"author" : "xcode",
19+
"version" : 1
20+
}
21+
}
21.5 KB
Loading[フレーム]

‎VFL/Base.lproj/Main.storyboard‎

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,32 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
3+
<device id="retina6_1" orientation="portrait" appearance="light"/>
34
<dependencies>
4-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
5+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/>
56
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
7+
<capability name="System colors in document resources" minToolsVersion="11.0"/>
68
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
79
</dependencies>
810
<scenes>
911
<!--View Controller-->
1012
<scene sceneID="tne-QT-ifu">
1113
<objects>
12-
<viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="target" sceneMemberID="viewController">
14+
<viewController id="BYZ-38-t0r" customClass="ViewController" customModule="VFL"customModuleProvider="target" sceneMemberID="viewController">
1315
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
14-
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
16+
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
1517
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
16-
<color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
1718
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
19+
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
1820
</view>
1921
</viewController>
2022
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
2123
</objects>
24+
<point key="canvasLocation" x="34.782608695652179" y="137.94642857142856"/>
2225
</scene>
2326
</scenes>
27+
<resources>
28+
<systemColor name="systemBackgroundColor">
29+
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
30+
</systemColor>
31+
</resources>
2432
</document>

‎VFL/ViewController.swift‎

Lines changed: 55 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,64 @@
88
import UIKit
99

1010
class ViewController: UIViewController {
11-
11+
12+
let appleImageView: UIImageView = {
13+
let imageView = UIImageView(image: #imageLiteral(resourceName: "apple"))
14+
imageView.translatesAutoresizingMaskIntoConstraints = false
15+
return imageView
16+
}()
17+
18+
let appLabel: UILabel = {
19+
let label = UILabel()
20+
label.text = "Swift"
21+
return label
22+
}()
23+
24+
let skipButton: UIButton = {
25+
let button = UIButton()
26+
button.setTitle("Skip", for: .normal)
27+
return button
28+
}()
29+
30+
let swiftImageView: UIImageView = {
31+
let imageView = UIImageView(image: #imageLiteral(resourceName: "swift"))
32+
imageView.translatesAutoresizingMaskIntoConstraints = false
33+
return imageView
34+
}()
35+
36+
let welcomeLabel: UILabel = {
37+
let label = UILabel()
38+
label.text = "Welcome to Swift"
39+
label.font = .boldSystemFont(ofSize: 18)
40+
return label
41+
}()
42+
43+
let summaryLabel: UILabel = {
44+
let label = UILabel()
45+
label.text = "Swift는 macOS, iOS, iPadOS, watchOS, tvOS앱을 개발하기 위한 최적의 언어입니다."
46+
label.textAlignment = .center
47+
return label
48+
}()
49+
50+
let pageControl: UIPageControl = {
51+
let pageControl = UIPageControl()
52+
pageControl.numberOfPages = 5
53+
pageControl.currentPage = 0
54+
return pageControl
55+
}()
56+
1257
override func viewDidLoad() {
1358
super.viewDidLoad()
14-
// Do any additional setup after loading the view.
59+
60+
view.addSubview(appleImageView)
61+
view.addSubview(appLabel)
62+
view.addSubview(skipButton)
63+
view.addSubview(swiftImageView)
64+
view.addSubview(welcomeLabel)
65+
view.addSubview(summaryLabel)
66+
view.addSubview(pageControl)
67+
1568
}
1669

17-
1870
}
1971

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /