Skip to content

Commit f5cdf3e

Browse files
committed
Add "Framework Integration" > "Interfacing with UIKit"
1 parent 8790e77 commit f5cdf3e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+3039
-0
lines changed
+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
//
2+
// AppDelegate.swift
3+
// Framework-Integration
4+
//
5+
// Created by 王炜 on 2019/6/9.
6+
//
7+
8+
import UIKit
9+
10+
@UIApplicationMain
11+
class AppDelegate: UIResponder, UIApplicationDelegate {
12+
13+
14+
15+
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
16+
// Override point for customization after application launch.
17+
return true
18+
}
19+
20+
func applicationWillTerminate(_ application: UIApplication) {
21+
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
22+
}
23+
24+
// MARK: UISceneSession Lifecycle
25+
26+
func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
27+
// Called when a new scene session is being created.
28+
// Use this method to select a configuration to create the new scene with.
29+
return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
30+
}
31+
32+
func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
33+
// Called when the user discards a scene session.
34+
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
35+
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
36+
}
37+
38+
39+
}
40+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
{
2+
"images" : [
3+
{
4+
"size" : "20x20",
5+
"idiom" : "iphone",
6+
"filename" : "landmark_app_icon_40x40.png",
7+
"scale" : "2x"
8+
},
9+
{
10+
"idiom" : "iphone",
11+
"size" : "20x20",
12+
"scale" : "3x"
13+
},
14+
{
15+
"size" : "29x29",
16+
"idiom" : "iphone",
17+
"filename" : "landmark_app_icon_58x58.png",
18+
"scale" : "2x"
19+
},
20+
{
21+
"size" : "29x29",
22+
"idiom" : "iphone",
23+
"filename" : "landmark_app_icon_87x87.png",
24+
"scale" : "3x"
25+
},
26+
{
27+
"size" : "40x40",
28+
"idiom" : "iphone",
29+
"filename" : "landmark_app_icon_80x80.png",
30+
"scale" : "2x"
31+
},
32+
{
33+
"size" : "40x40",
34+
"idiom" : "iphone",
35+
"filename" : "landmark_app_icon_120x120.png",
36+
"scale" : "3x"
37+
},
38+
{
39+
"idiom" : "iphone",
40+
"size" : "60x60",
41+
"scale" : "2x"
42+
},
43+
{
44+
"idiom" : "iphone",
45+
"size" : "60x60",
46+
"scale" : "3x"
47+
},
48+
{
49+
"idiom" : "ipad",
50+
"size" : "20x20",
51+
"scale" : "1x"
52+
},
53+
{
54+
"size" : "20x20",
55+
"idiom" : "ipad",
56+
"filename" : "landmark_app_icon_40x40-1.png",
57+
"scale" : "2x"
58+
},
59+
{
60+
"idiom" : "ipad",
61+
"size" : "29x29",
62+
"scale" : "1x"
63+
},
64+
{
65+
"size" : "29x29",
66+
"idiom" : "ipad",
67+
"filename" : "landmark_app_icon_58x58-1.png",
68+
"scale" : "2x"
69+
},
70+
{
71+
"size" : "40x40",
72+
"idiom" : "ipad",
73+
"filename" : "landmark_app_icon_40x40-2.png",
74+
"scale" : "1x"
75+
},
76+
{
77+
"size" : "40x40",
78+
"idiom" : "ipad",
79+
"filename" : "landmark_app_icon_80x80-1.png",
80+
"scale" : "2x"
81+
},
82+
{
83+
"size" : "76x76",
84+
"idiom" : "ipad",
85+
"filename" : "landmark_app_icon_76x76.png",
86+
"scale" : "1x"
87+
},
88+
{
89+
"size" : "76x76",
90+
"idiom" : "ipad",
91+
"filename" : "landmark_app_icon_152x152.png",
92+
"scale" : "2x"
93+
},
94+
{
95+
"size" : "83.5x83.5",
96+
"idiom" : "ipad",
97+
"filename" : "landmark_app_icon_167x167.png",
98+
"scale" : "2x"
99+
},
100+
{
101+
"size" : "1024x1024",
102+
"idiom" : "ios-marketing",
103+
"filename" : "landmark_app_icon_1024x1024.png",
104+
"scale" : "1x"
105+
}
106+
],
107+
"info" : {
108+
"version" : 1,
109+
"author" : "xcode"
110+
}
111+
}
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"info" : {
3+
"version" : 1,
4+
"author" : "xcode"
5+
}
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"filename" : "turtlerock.jpg",
6+
"scale" : "1x"
7+
},
8+
{
9+
"idiom" : "universal",
10+
"scale" : "2x"
11+
},
12+
{
13+
"idiom" : "universal",
14+
"scale" : "3x"
15+
}
16+
],
17+
"info" : {
18+
"version" : 1,
19+
"author" : "xcode"
20+
}
21+
}
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
3+
<dependencies>
4+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
5+
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
6+
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
7+
</dependencies>
8+
<scenes>
9+
<!--View Controller-->
10+
<scene sceneID="EHf-IW-A2E">
11+
<objects>
12+
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
13+
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
14+
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
15+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
16+
<color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
17+
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
18+
</view>
19+
</viewController>
20+
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
21+
</objects>
22+
<point key="canvasLocation" x="53" y="375"/>
23+
</scene>
24+
</scenes>
25+
</document>
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
//
2+
// ContentView.swift
3+
// Framework-Integration
4+
//
5+
// Created by 王炜 on 2019/6/9.
6+
//
7+
8+
import SwiftUI
9+
10+
struct ContentView : View {
11+
var body: some View {
12+
Text("Hello World")
13+
}
14+
}
15+
16+
#if DEBUG
17+
struct ContentView_Previews : PreviewProvider {
18+
static var previews: some View {
19+
ContentView()
20+
}
21+
}
22+
#endif
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
/*
2+
See LICENSE folder for this sample’s licensing information.
3+
4+
Abstract:
5+
Size, position, and other information used to draw a badge.
6+
*/
7+
8+
import SwiftUI
9+
10+
struct HexagonParameters {
11+
struct Segment {
12+
let useWidth: (CGFloat, CGFloat, CGFloat)
13+
let xFactors: (CGFloat, CGFloat, CGFloat)
14+
let useHeight: (CGFloat, CGFloat, CGFloat)
15+
let yFactors: (CGFloat, CGFloat, CGFloat)
16+
}
17+
18+
static let adjustment: CGFloat = 0.085
19+
static let points = [
20+
Segment(
21+
useWidth: (1.00, 1.00, 1.00),
22+
xFactors: (0.60, 0.40, 0.50),
23+
useHeight: (1.00, 1.00, 0.00),
24+
yFactors: (0.05, 0.05, 0.00)
25+
),
26+
Segment(
27+
useWidth: (1.00, 1.00, 0.00),
28+
xFactors: (0.05, 0.00, 0.00),
29+
useHeight: (1.00, 1.00, 1.00),
30+
yFactors: (0.20 + adjustment, 0.30 + adjustment, 0.25 + adjustment)
31+
),
32+
Segment(
33+
useWidth: (1.00, 1.00, 0.00),
34+
xFactors: (0.00, 0.05, 0.00),
35+
useHeight: (1.00, 1.00, 1.00),
36+
yFactors: (0.70 - adjustment, 0.80 - adjustment, 0.75 - adjustment)
37+
),
38+
Segment(
39+
useWidth: (1.00, 1.00, 1.00),
40+
xFactors: (0.40, 0.60, 0.50),
41+
useHeight: (1.00, 1.00, 1.00),
42+
yFactors: (0.95, 0.95, 1.00)
43+
),
44+
Segment(
45+
useWidth: (1.00, 1.00, 1.00),
46+
xFactors: (0.95, 1.00, 1.00),
47+
useHeight: (1.00, 1.00, 1.00),
48+
yFactors: (0.80 - adjustment, 0.70 - adjustment, 0.75 - adjustment)
49+
),
50+
Segment(
51+
useWidth: (1.00, 1.00, 1.00),
52+
xFactors: (1.00, 0.95, 1.00),
53+
useHeight: (1.00, 1.00, 1.00),
54+
yFactors: (0.30 + adjustment, 0.20 + adjustment, 0.25 + adjustment)
55+
)
56+
]
57+
}

Framework-Integration/Info.plist

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleDevelopmentRegion</key>
6+
<string>$(DEVELOPMENT_LANGUAGE)</string>
7+
<key>CFBundleExecutable</key>
8+
<string>$(EXECUTABLE_NAME)</string>
9+
<key>CFBundleIdentifier</key>
10+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
11+
<key>CFBundleInfoDictionaryVersion</key>
12+
<string>6.0</string>
13+
<key>CFBundleName</key>
14+
<string>$(PRODUCT_NAME)</string>
15+
<key>CFBundlePackageType</key>
16+
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
17+
<key>CFBundleShortVersionString</key>
18+
<string>1.0</string>
19+
<key>CFBundleVersion</key>
20+
<string>1</string>
21+
<key>LSRequiresIPhoneOS</key>
22+
<true/>
23+
<key>UIApplicationSceneManifest</key>
24+
<dict>
25+
<key>UIApplicationSupportsMultipleScenes</key>
26+
<false/>
27+
<key>UISceneConfigurations</key>
28+
<dict>
29+
<key>UIWindowSceneSessionRoleApplication</key>
30+
<array>
31+
<dict>
32+
<key>UILaunchStoryboardName</key>
33+
<string>LaunchScreen</string>
34+
<key>UISceneConfigurationName</key>
35+
<string>Default Configuration</string>
36+
<key>UISceneDelegateClassName</key>
37+
<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
38+
</dict>
39+
</array>
40+
</dict>
41+
</dict>
42+
<key>UILaunchStoryboardName</key>
43+
<string>LaunchScreen</string>
44+
<key>UIRequiredDeviceCapabilities</key>
45+
<array>
46+
<string>armv7</string>
47+
</array>
48+
<key>UISupportedInterfaceOrientations</key>
49+
<array>
50+
<string>UIInterfaceOrientationPortrait</string>
51+
<string>UIInterfaceOrientationLandscapeLeft</string>
52+
<string>UIInterfaceOrientationLandscapeRight</string>
53+
</array>
54+
<key>UISupportedInterfaceOrientations~ipad</key>
55+
<array>
56+
<string>UIInterfaceOrientationPortrait</string>
57+
<string>UIInterfaceOrientationPortraitUpsideDown</string>
58+
<string>UIInterfaceOrientationLandscapeLeft</string>
59+
<string>UIInterfaceOrientationLandscapeRight</string>
60+
</array>
61+
</dict>
62+
</plist>

0 commit comments

Comments
 (0)