Add Jike
65
Examples/Jike/SwiftUI_Jike/ActivityView.swift
Executable file
@@ -0,0 +1,65 @@
|
||||
//
|
||||
// ActivityView.swift
|
||||
// SwiftUI_Jike
|
||||
//
|
||||
// Created by alexyang on 2019/6/5.
|
||||
// Copyright © 2019 alexyang. All rights reserved.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct ActivityView : View {
|
||||
var body: some View {
|
||||
VStack{
|
||||
VStack{
|
||||
HStack{
|
||||
Image("addPer")
|
||||
.padding(.horizontal, 10)
|
||||
Spacer()
|
||||
Text("动态").bold()
|
||||
.padding(.trailing, 44)
|
||||
Spacer()
|
||||
|
||||
}
|
||||
}
|
||||
HStack{
|
||||
Color(red: 240.0/255.0, green: 243.0/255.0, blue: 245.0/255)
|
||||
}
|
||||
.padding(.top, 0)
|
||||
.frame(height: 10.0)
|
||||
HStack(alignment: .center){
|
||||
CircleImage(imgName: "subIcon")
|
||||
.padding(.leading, 10)
|
||||
Text("发布动态...")
|
||||
.color(Color.gray)
|
||||
Spacer()
|
||||
}
|
||||
HStack{
|
||||
Color(red: 240.0/255.0, green: 243.0/255.0, blue: 245.0/255)
|
||||
}
|
||||
.padding(.top, 0)
|
||||
.frame(height: 10.0)
|
||||
|
||||
List{
|
||||
ActivityCell(nickName: "皮卡丘", timeStamp: "2小时前",content: "发明一种新吃法#一人食灌蛋手抓饼夹小油条泡菜香肠,挤上番茄酱甜面酱巨好吃呀😘!!灌蛋是灵魂,不能偷懒!!", imgName: "sucai"
|
||||
)
|
||||
ActivityCell(nickName: "皮卡丘", timeStamp: "2小时前",content: "发明一种新吃法#一人食灌蛋手抓饼夹小油条泡菜香肠,挤上番茄酱甜面酱巨好吃呀😘!!灌蛋是灵魂,不能偷懒!!", imgName: "sucai"
|
||||
)
|
||||
ActivityCell(nickName: "皮卡丘", timeStamp: "2小时前",content: "发明一种新吃法#一人食灌蛋手抓饼夹小油条泡菜香肠,挤上番茄酱甜面酱巨好吃呀😘!!灌蛋是灵魂,不能偷懒!!", imgName: "sucai"
|
||||
)
|
||||
ActivityCell(nickName: "皮卡丘", timeStamp: "2小时前",content: "发明一种新吃法#一人食灌蛋手抓饼夹小油条泡菜香肠,挤上番茄酱甜面酱巨好吃呀😘!!灌蛋是灵魂,不能偷懒!!", imgName: "sucai"
|
||||
)
|
||||
}
|
||||
.padding(.leading, -20)
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
struct ActivityView_Previews : PreviewProvider {
|
||||
static var previews: some View {
|
||||
ActivityView()
|
||||
}
|
||||
}
|
||||
#endif
|
||||
41
Examples/Jike/SwiftUI_Jike/AppDelegate.swift
Executable file
@@ -0,0 +1,41 @@
|
||||
//
|
||||
// AppDelegate.swift
|
||||
// SwiftUI_Jike
|
||||
//
|
||||
// Created by alexyang on 2019/6/5.
|
||||
// Copyright © 2019 alexyang. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
@UIApplicationMain
|
||||
class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
|
||||
|
||||
|
||||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
|
||||
// Override point for customization after application launch.
|
||||
return true
|
||||
}
|
||||
|
||||
func applicationWillTerminate(_ application: UIApplication) {
|
||||
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
|
||||
}
|
||||
|
||||
// MARK: UISceneSession Lifecycle
|
||||
|
||||
func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
|
||||
// Called when a new scene session is being created.
|
||||
// Use this method to select a configuration to create the new scene with.
|
||||
return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
|
||||
}
|
||||
|
||||
func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
|
||||
// Called when the user discards a scene session.
|
||||
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
|
||||
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
158
Examples/Jike/SwiftUI_Jike/Assets.xcassets/AppIcon.appiconset/Contents.json
Executable file
@@ -0,0 +1,158 @@
|
||||
{
|
||||
"images": [
|
||||
{
|
||||
"size": "20x20",
|
||||
"idiom": "iphone",
|
||||
"filename": "icon-20@2x.png",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"size": "20x20",
|
||||
"idiom": "iphone",
|
||||
"filename": "icon-20@3x.png",
|
||||
"scale": "3x"
|
||||
},
|
||||
{
|
||||
"size": "29x29",
|
||||
"idiom": "iphone",
|
||||
"filename": "icon-29.png",
|
||||
"scale": "1x"
|
||||
},
|
||||
{
|
||||
"size": "29x29",
|
||||
"idiom": "iphone",
|
||||
"filename": "icon-29@2x.png",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"size": "29x29",
|
||||
"idiom": "iphone",
|
||||
"filename": "icon-29@3x.png",
|
||||
"scale": "3x"
|
||||
},
|
||||
{
|
||||
"size": "40x40",
|
||||
"idiom": "iphone",
|
||||
"filename": "icon-40@2x.png",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"size": "40x40",
|
||||
"idiom": "iphone",
|
||||
"filename": "icon-40@3x.png",
|
||||
"scale": "3x"
|
||||
},
|
||||
{
|
||||
"size": "57x57",
|
||||
"idiom": "iphone",
|
||||
"filename": "icon-57.png",
|
||||
"scale": "1x"
|
||||
},
|
||||
{
|
||||
"size": "57x57",
|
||||
"idiom": "iphone",
|
||||
"filename": "icon-57@2x.png",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"size": "60x60",
|
||||
"idiom": "iphone",
|
||||
"filename": "icon-60@2x.png",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"size": "60x60",
|
||||
"idiom": "iphone",
|
||||
"filename": "icon-60@3x.png",
|
||||
"scale": "3x"
|
||||
},
|
||||
{
|
||||
"size": "20x20",
|
||||
"idiom": "ipad",
|
||||
"filename": "icon-20-ipad.png",
|
||||
"scale": "1x"
|
||||
},
|
||||
{
|
||||
"size": "20x20",
|
||||
"idiom": "ipad",
|
||||
"filename": "icon-20@2x-ipad.png",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"size": "29x29",
|
||||
"idiom": "ipad",
|
||||
"filename": "icon-29-ipad.png",
|
||||
"scale": "1x"
|
||||
},
|
||||
{
|
||||
"size": "29x29",
|
||||
"idiom": "ipad",
|
||||
"filename": "icon-29@2x-ipad.png",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"size": "40x40",
|
||||
"idiom": "ipad",
|
||||
"filename": "icon-40.png",
|
||||
"scale": "1x"
|
||||
},
|
||||
{
|
||||
"size": "40x40",
|
||||
"idiom": "ipad",
|
||||
"filename": "icon-40@2x.png",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"size": "50x50",
|
||||
"idiom": "ipad",
|
||||
"filename": "icon-50.png",
|
||||
"scale": "1x"
|
||||
},
|
||||
{
|
||||
"size": "50x50",
|
||||
"idiom": "ipad",
|
||||
"filename": "icon-50@2x.png",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"size": "72x72",
|
||||
"idiom": "ipad",
|
||||
"filename": "icon-72.png",
|
||||
"scale": "1x"
|
||||
},
|
||||
{
|
||||
"size": "72x72",
|
||||
"idiom": "ipad",
|
||||
"filename": "icon-72@2x.png",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"size": "76x76",
|
||||
"idiom": "ipad",
|
||||
"filename": "icon-76.png",
|
||||
"scale": "1x"
|
||||
},
|
||||
{
|
||||
"size": "76x76",
|
||||
"idiom": "ipad",
|
||||
"filename": "icon-76@2x.png",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"size": "83.5x83.5",
|
||||
"idiom": "ipad",
|
||||
"filename": "icon-83.5@2x.png",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"size": "1024x1024",
|
||||
"idiom": "ios-marketing",
|
||||
"filename": "icon-1024.png",
|
||||
"scale": "1x"
|
||||
}
|
||||
],
|
||||
"info": {
|
||||
"version": 1,
|
||||
"author": "icon.wuruihong.com"
|
||||
}
|
||||
}
|
||||
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/AppIcon.appiconset/icon-1024.png
Executable file
|
After Width: | Height: | Size: 75 KiB |
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/AppIcon.appiconset/icon-20-ipad.png
Executable file
|
After Width: | Height: | Size: 570 B |
|
After Width: | Height: | Size: 1.0 KiB |
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png
Executable file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png
Executable file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/AppIcon.appiconset/icon-29-ipad.png
Executable file
|
After Width: | Height: | Size: 811 B |
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/AppIcon.appiconset/icon-29.png
Executable file
|
After Width: | Height: | Size: 811 B |
|
After Width: | Height: | Size: 1.3 KiB |
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png
Executable file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png
Executable file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/AppIcon.appiconset/icon-40.png
Executable file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png
Executable file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png
Executable file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/AppIcon.appiconset/icon-50.png
Executable file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/AppIcon.appiconset/icon-50@2x.png
Executable file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/AppIcon.appiconset/icon-57.png
Executable file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/AppIcon.appiconset/icon-57@2x.png
Executable file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png
Executable file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png
Executable file
|
After Width: | Height: | Size: 6.5 KiB |
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/AppIcon.appiconset/icon-72.png
Executable file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/AppIcon.appiconset/icon-72@2x.png
Executable file
|
After Width: | Height: | Size: 4.5 KiB |
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/AppIcon.appiconset/icon-76.png
Executable file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png
Executable file
|
After Width: | Height: | Size: 5.0 KiB |
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png
Executable file
|
After Width: | Height: | Size: 5.7 KiB |
6
Examples/Jike/SwiftUI_Jike/Assets.xcassets/Contents.json
Executable file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
21
Examples/Jike/SwiftUI_Jike/Assets.xcassets/addPer.imageset/Contents.json
vendored
Executable file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_navbar_add_friends_Normal@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/addPer.imageset/ic_navbar_add_friends_Normal@3x.png
vendored
Executable file
|
After Width: | Height: | Size: 4.2 KiB |
21
Examples/Jike/SwiftUI_Jike/Assets.xcassets/chat_box.imageset/Contents.json
vendored
Executable file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_chat_box_Normal@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/chat_box.imageset/ic_chat_box_Normal@3x.png
vendored
Executable file
|
After Width: | Height: | Size: 4.6 KiB |
21
Examples/Jike/SwiftUI_Jike/Assets.xcassets/dianzan.imageset/Contents.json
vendored
Executable file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_comment_like_Normal@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/dianzan.imageset/ic_comment_like_Normal@3x.png
vendored
Executable file
|
After Width: | Height: | Size: 4.5 KiB |
21
Examples/Jike/SwiftUI_Jike/Assets.xcassets/discovery_icon.imageset/Contents.json
vendored
Executable file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_navbar_discovery_Normal@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/discovery_icon.imageset/ic_navbar_discovery_Normal@3x.png
vendored
Executable file
|
After Width: | Height: | Size: 3.9 KiB |
21
Examples/Jike/SwiftUI_Jike/Assets.xcassets/meIcon.imageset/Contents.json
vendored
Executable file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "IMG_9777_Fotor.jpg",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/meIcon.imageset/IMG_9777_Fotor.jpg
vendored
Executable file
|
After Width: | Height: | Size: 26 KiB |
21
Examples/Jike/SwiftUI_Jike/Assets.xcassets/pinglun.imageset/Contents.json
vendored
Executable file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_messages_comment_Normal@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/pinglun.imageset/ic_messages_comment_Normal@3x.png
vendored
Executable file
|
After Width: | Height: | Size: 4.6 KiB |
21
Examples/Jike/SwiftUI_Jike/Assets.xcassets/pokemon.imageset/Contents.json
vendored
Executable file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "WechatIMG46_Fotor.jpg",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/pokemon.imageset/WechatIMG46_Fotor.jpg
vendored
Executable file
|
After Width: | Height: | Size: 12 KiB |
21
Examples/Jike/SwiftUI_Jike/Assets.xcassets/righ_arrow.imageset/Contents.json
vendored
Executable file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_common_arrow_right_Normal@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/righ_arrow.imageset/ic_common_arrow_right_Normal@3x.png
vendored
Executable file
|
After Width: | Height: | Size: 3.6 KiB |
21
Examples/Jike/SwiftUI_Jike/Assets.xcassets/scan_icon.imageset/Contents.json
vendored
Executable file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_navbar_scan_Normal@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/scan_icon.imageset/ic_navbar_scan_Normal@3x.png
vendored
Executable file
|
After Width: | Height: | Size: 3.9 KiB |
21
Examples/Jike/SwiftUI_Jike/Assets.xcassets/search_icon.imageset/Contents.json
vendored
Executable file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_navbar_search_Normal@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/search_icon.imageset/ic_navbar_search_Normal@3x.png
vendored
Executable file
|
After Width: | Height: | Size: 4.7 KiB |
21
Examples/Jike/SwiftUI_Jike/Assets.xcassets/setting_feedback.imageset/Contents.json
vendored
Executable file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_personal_tab_support_center_Normal@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/setting_feedback.imageset/ic_personal_tab_support_center_Normal@3x.png
vendored
Executable file
|
After Width: | Height: | Size: 1.6 KiB |
21
Examples/Jike/SwiftUI_Jike/Assets.xcassets/setting_hehuoren.imageset/Contents.json
vendored
Executable file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_comment_sync_jike_selected_Normal@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/setting_hehuoren.imageset/ic_comment_sync_jike_selected_Normal@3x.png
vendored
Executable file
|
After Width: | Height: | Size: 3.6 KiB |
21
Examples/Jike/SwiftUI_Jike/Assets.xcassets/setting_icon.imageset/Contents.json
vendored
Executable file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_navbar_setting_Normal@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/setting_icon.imageset/ic_navbar_setting_Normal@3x.png
vendored
Executable file
|
After Width: | Height: | Size: 4.4 KiB |
21
Examples/Jike/SwiftUI_Jike/Assets.xcassets/setting_mainliuliang.imageset/Contents.json
vendored
Executable file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_personal_tab_kingcard_Normal@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/setting_mainliuliang.imageset/ic_personal_tab_kingcard_Normal@3x.png
vendored
Executable file
|
After Width: | Height: | Size: 631 B |
21
Examples/Jike/SwiftUI_Jike/Assets.xcassets/setting_quanzi.imageset/Contents.json
vendored
Executable file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_personal_tab_my_topic_Normal@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/setting_quanzi.imageset/ic_personal_tab_my_topic_Normal@3x.png
vendored
Executable file
|
After Width: | Height: | Size: 1.5 KiB |
21
Examples/Jike/SwiftUI_Jike/Assets.xcassets/setting_shoucang.imageset/Contents.json
vendored
Executable file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_personal_tab_collection_Normal@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/setting_shoucang.imageset/ic_personal_tab_collection_Normal@3x.png
vendored
Executable file
|
After Width: | Height: | Size: 1.4 KiB |
21
Examples/Jike/SwiftUI_Jike/Assets.xcassets/setting_tongzhi.imageset/Contents.json
vendored
Executable file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_personal_tab_activity_notification_new_messages_4_Normal@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
21
Examples/Jike/SwiftUI_Jike/Assets.xcassets/share.imageset/Contents.json
vendored
Executable file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_messages_share_Normal@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/share.imageset/ic_messages_share_Normal@3x.png
vendored
Executable file
|
After Width: | Height: | Size: 4.7 KiB |
21
Examples/Jike/SwiftUI_Jike/Assets.xcassets/shenglue.imageset/Contents.json
vendored
Executable file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_messages_more_Normal@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/shenglue.imageset/ic_messages_more_Normal@3x.png
vendored
Executable file
|
After Width: | Height: | Size: 3.6 KiB |
21
Examples/Jike/SwiftUI_Jike/Assets.xcassets/subIcon.imageset/Contents.json
vendored
Executable file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "IMG_9776_Fotor.jpg",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/subIcon.imageset/IMG_9776_Fotor.jpg
vendored
Executable file
|
After Width: | Height: | Size: 16 KiB |
21
Examples/Jike/SwiftUI_Jike/Assets.xcassets/sucai.imageset/Contents.json
vendored
Executable file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "IMG_9778_Fotor.jpg",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/sucai.imageset/IMG_9778_Fotor.jpg
vendored
Executable file
|
After Width: | Height: | Size: 132 KiB |
21
Examples/Jike/SwiftUI_Jike/Assets.xcassets/tab_chat_normal.imageset/Contents.json
vendored
Executable file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_navbar_chat_Normal@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/tab_chat_normal.imageset/ic_navbar_chat_Normal@3x.png
vendored
Executable file
|
After Width: | Height: | Size: 4.6 KiB |
24
Examples/Jike/SwiftUI_Jike/Assets.xcassets/tab_chat_select.imageset/Contents.json
vendored
Executable file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_tabbar_chat_selected_Normal@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
},
|
||||
"properties" : {
|
||||
"template-rendering-intent" : "original"
|
||||
}
|
||||
}
|
||||
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/tab_chat_select.imageset/ic_tabbar_chat_selected_Normal@3x.png
vendored
Executable file
|
After Width: | Height: | Size: 4.6 KiB |
21
Examples/Jike/SwiftUI_Jike/Assets.xcassets/tab_home_normal.imageset/Contents.json
vendored
Executable file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_tabbar_home_unselected_Normal@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/tab_home_normal.imageset/ic_tabbar_home_unselected_Normal@3x.png
vendored
Executable file
|
After Width: | Height: | Size: 4.6 KiB |
24
Examples/Jike/SwiftUI_Jike/Assets.xcassets/tab_home_select.imageset/Contents.json
vendored
Executable file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_tabbar_home_selected_Normal@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
},
|
||||
"properties" : {
|
||||
"template-rendering-intent" : "original"
|
||||
}
|
||||
}
|
||||
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/tab_home_select.imageset/ic_tabbar_home_selected_Normal@3x.png
vendored
Executable file
|
After Width: | Height: | Size: 4.2 KiB |
21
Examples/Jike/SwiftUI_Jike/Assets.xcassets/tab_me_normal.imageset/Contents.json
vendored
Executable file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_tabbar_personal_unselected_Normal@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/tab_me_normal.imageset/ic_tabbar_personal_unselected_Normal@3x.png
vendored
Executable file
|
After Width: | Height: | Size: 4.9 KiB |
24
Examples/Jike/SwiftUI_Jike/Assets.xcassets/tab_me_select.imageset/Contents.json
vendored
Executable file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_tabbar_personal_selected_Normal@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
},
|
||||
"properties" : {
|
||||
"template-rendering-intent" : "original"
|
||||
}
|
||||
}
|
||||
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/tab_me_select.imageset/ic_tabbar_personal_selected_Normal@3x.png
vendored
Executable file
|
After Width: | Height: | Size: 4.5 KiB |
21
Examples/Jike/SwiftUI_Jike/Assets.xcassets/tab_status_normal.imageset/Contents.json
vendored
Executable file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_tabbar_activity_unselected_Normal@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/tab_status_normal.imageset/ic_tabbar_activity_unselected_Normal@3x.png
vendored
Executable file
|
After Width: | Height: | Size: 5.5 KiB |
24
Examples/Jike/SwiftUI_Jike/Assets.xcassets/tab_status_select.imageset/Contents.json
vendored
Executable file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_tabbar_activity_selected_Normal@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
},
|
||||
"properties" : {
|
||||
"template-rendering-intent" : "original"
|
||||
}
|
||||
}
|
||||
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/tab_status_select.imageset/ic_tabbar_activity_selected_Normal@3x.png
vendored
Executable file
|
After Width: | Height: | Size: 5.0 KiB |
21
Examples/Jike/SwiftUI_Jike/Assets.xcassets/touxiang.imageset/Contents.json
vendored
Executable file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_personal_tab_follower_Normal@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
BIN
Examples/Jike/SwiftUI_Jike/Assets.xcassets/touxiang.imageset/ic_personal_tab_follower_Normal@3x.png
vendored
Executable file
|
After Width: | Height: | Size: 3.9 KiB |
25
Examples/Jike/SwiftUI_Jike/Base.lproj/LaunchScreen.storyboard
Executable file
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<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">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="EHf-IW-A2E">
|
||||
<objects>
|
||||
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
|
||||
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="53" y="375"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
||||
71
Examples/Jike/SwiftUI_Jike/Cell/ActivityCell.swift
Executable file
@@ -0,0 +1,71 @@
|
||||
//
|
||||
// ActivityCell.swift
|
||||
// SwiftUI_Jike
|
||||
//
|
||||
// Created by alexyang on 2019/6/5.
|
||||
// Copyright © 2019 alexyang. All rights reserved.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct ActivityCell : View {
|
||||
var nickName:String
|
||||
var timeStamp:String
|
||||
var content:String
|
||||
var imgName:String
|
||||
var body: some View {
|
||||
VStack(alignment: .leading){
|
||||
HStack(){
|
||||
VStack{
|
||||
CircleImage(imgName: "pokemon")
|
||||
.padding(.leading, 20)
|
||||
.padding(.top, 10)
|
||||
Spacer()
|
||||
}
|
||||
|
||||
VStack(alignment: .leading){
|
||||
HStack{
|
||||
Text(nickName)
|
||||
.padding(.top, 5)
|
||||
.padding(.bottom, 2)
|
||||
Spacer()
|
||||
}
|
||||
Text(timeStamp)
|
||||
.font(Font.system(size: 12))
|
||||
.color(Color.gray)
|
||||
.padding(.bottom, 2)
|
||||
|
||||
Text(content)
|
||||
.frame(minHeight:50, maxHeight: 300, alignment: .top)
|
||||
.font(Font.system(size: 15))
|
||||
.lineLimit(-1)
|
||||
Image(imgName)
|
||||
.padding(.bottom, 20)
|
||||
.padding(.trailing, 10)
|
||||
}
|
||||
|
||||
}
|
||||
HStack{
|
||||
Spacer()
|
||||
Image("dianzan")
|
||||
Spacer()
|
||||
Image("pinglun")
|
||||
Spacer()
|
||||
Image("share")
|
||||
Spacer()
|
||||
Image("shenglue")
|
||||
}
|
||||
}
|
||||
.lineSpacing(0)
|
||||
.frame(minHeight: 300)
|
||||
}
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
struct ActivityCell_Previews : PreviewProvider {
|
||||
static var previews: some View {
|
||||
ActivityCell(nickName: "皮卡丘", timeStamp: "2小时前",content: "发明一种新吃法#一人食灌蛋手抓饼夹小油条泡菜香肠,挤上番茄酱甜面酱巨好吃呀😘!!灌蛋是灵魂,不能偷懒!!", imgName: "sucai"
|
||||
)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
60
Examples/Jike/SwiftUI_Jike/Cell/CategoryRow.swift
Executable file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
See LICENSE folder for this sample’s licensing information.
|
||||
|
||||
Abstract:
|
||||
A view showing a scrollable list of landmarks.
|
||||
*/
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct CategoryRow: View {
|
||||
var items: [ZoneModel]
|
||||
|
||||
var body: some View {
|
||||
VStack(alignment: .leading) {
|
||||
ScrollView(showsHorizontalIndicator: false) {
|
||||
HStack(alignment: .top, spacing: 0) {
|
||||
ForEach(self.items.identified(by: \.id)) { zone in
|
||||
CategoryItem(zone: zone)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct CategoryItem: View {
|
||||
var zone: ZoneModel
|
||||
var body: some View {
|
||||
VStack(alignment: .center) {
|
||||
|
||||
VStack{
|
||||
Color.white
|
||||
.frame(width:65,height:65)
|
||||
.border(Color(red: 218.0/255.0, green: 218.0/255.0, blue: 218.0/255.0),width: 3,cornerRadius: 15)
|
||||
.cornerRadius(15)
|
||||
zone
|
||||
.image(forSize: 55)
|
||||
.renderingMode(.original)
|
||||
.cornerRadius(10)
|
||||
.padding(.top,-68)
|
||||
|
||||
}
|
||||
Text(zone.name)
|
||||
.frame(width: 65, height: 20, alignment: .center)
|
||||
.font(Font.system(size: 12))
|
||||
.padding(.top, -8)
|
||||
}
|
||||
.padding(.trailing, -5)
|
||||
.padding(.leading, 10)
|
||||
}
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
struct CategoryRow_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
|
||||
CategoryRow(items: zonnData)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
40
Examples/Jike/SwiftUI_Jike/Cell/ChatCell.swift
Executable file
@@ -0,0 +1,40 @@
|
||||
//
|
||||
// ChatCell.swift
|
||||
// SwiftUI_Jike
|
||||
//
|
||||
// Created by alexyang on 2019/6/5.
|
||||
// Copyright © 2019 alexyang. All rights reserved.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct ChatCell : View {
|
||||
var imageName:String
|
||||
var title:String
|
||||
var subTitle:String
|
||||
var body: some View {
|
||||
HStack(alignment: .center){
|
||||
CircleImage(imgName:imageName)
|
||||
VStack(alignment: .leading){
|
||||
Text(title)
|
||||
.bold()
|
||||
.padding(.top, 4)
|
||||
Text(subTitle)
|
||||
.color(Color.gray)
|
||||
.padding(.bottom, 8)
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
.padding(.horizontal, 15)
|
||||
.frame(height: 60)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
struct ChatCell_Previews : PreviewProvider {
|
||||
static var previews: some View {
|
||||
ChatCell(imageName: "chat_box",title: "一条虫",subTitle: "瓦恁出来挨打")
|
||||
}
|
||||
}
|
||||
#endif
|
||||
27
Examples/Jike/SwiftUI_Jike/Cell/CircleImage.swift
Executable file
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
See LICENSE folder for this sample’s licensing information.
|
||||
|
||||
Abstract:
|
||||
A view that clips an image to a circle and adds a stroke and shadow.
|
||||
*/
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct CircleImage: View {
|
||||
var imgName:String
|
||||
var body: some View {
|
||||
Image(imgName)
|
||||
.clipShape(Circle())
|
||||
.overlay(
|
||||
|
||||
Circle().stroke(Color.white, lineWidth: 1))
|
||||
|
||||
.shadow(radius: 3)
|
||||
}
|
||||
}
|
||||
|
||||
struct CircleImage_Preview: PreviewProvider {
|
||||
static var previews: some View {
|
||||
CircleImage(imgName:"meIcon")
|
||||
}
|
||||
}
|
||||
51
Examples/Jike/SwiftUI_Jike/Cell/GYSegmentView.swift
Executable file
@@ -0,0 +1,51 @@
|
||||
//
|
||||
// GYSegmentView.swift
|
||||
// Landmarks
|
||||
//
|
||||
// Created by alexyang on 2019/6/6.
|
||||
// Copyright © 2019 Apple. All rights reserved.
|
||||
//
|
||||
import UIKit
|
||||
import SwiftUI
|
||||
|
||||
struct GYSegmentView : UIViewRepresentable {
|
||||
func makeCoordinator() -> GYSegmentView.Coordinator {
|
||||
Coordinator(self)
|
||||
}
|
||||
|
||||
|
||||
var titles:[String]
|
||||
@Binding var currentPage: Int
|
||||
|
||||
func makeUIView(context: Context) -> UISegmentedControl
|
||||
{
|
||||
let segment = UISegmentedControl(items: titles)
|
||||
segment.addTarget(context.coordinator, action:#selector(Coordinator.updateCurrentPage(sender:)) , for: .valueChanged)
|
||||
return segment
|
||||
}
|
||||
|
||||
func updateUIView(_ segment: UISegmentedControl, context: Context) {
|
||||
|
||||
segment.selectedSegmentIndex = currentPage
|
||||
}
|
||||
|
||||
class Coordinator: NSObject {
|
||||
var control: GYSegmentView
|
||||
|
||||
init(_ control: GYSegmentView) {
|
||||
self.control = control
|
||||
}
|
||||
|
||||
@objc func updateCurrentPage(sender: UISegmentedControl) {
|
||||
control.currentPage = sender.selectedSegmentIndex
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
struct GYSegmentView_Previews : PreviewProvider {
|
||||
static var previews: some View {
|
||||
GYSegmentView(titles: ["哈哈","你好","无聊"], currentPage: .constant(0))
|
||||
}
|
||||
}
|
||||
#endif
|
||||
92
Examples/Jike/SwiftUI_Jike/Cell/HomeCell.swift
Executable file
@@ -0,0 +1,92 @@
|
||||
//
|
||||
// HomeCell.swift
|
||||
// SwiftUI_Jike
|
||||
//
|
||||
// Created by alexyang on 2019/6/6.
|
||||
// Copyright © 2019 alexyang. All rights reserved.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct HomeCell : View {
|
||||
var zoneName:String
|
||||
var zoneImgName:String
|
||||
var userIcon:String
|
||||
var nickName:String
|
||||
var timeStamp:String
|
||||
var content:String
|
||||
var imgName:String
|
||||
var body: some View {
|
||||
VStack(alignment: .leading){
|
||||
VStack(){
|
||||
|
||||
HStack{
|
||||
ImageStore.shared.image(name: zoneImgName, size: 60)
|
||||
.cornerRadius(5)
|
||||
.padding(.leading, 20)
|
||||
.padding(.top, 10)
|
||||
.padding(.bottom, 10)
|
||||
VStack(alignment: .leading, spacing: 5){
|
||||
Text(zoneName)
|
||||
.font(Font.system(size: 16))
|
||||
.bold()
|
||||
Text(timeStamp)
|
||||
.font(Font.system(size: 12))
|
||||
.color(Color.gray)
|
||||
.padding(.top, 8)
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
.background(Color(red: 245.0/255.0, green: 245.0/255.0, blue: 245.0/255.0))
|
||||
|
||||
VStack(alignment: .leading){
|
||||
Text(content)
|
||||
.font(Font.system(size: 15))
|
||||
.frame(minWidth: 320,minHeight:50, maxHeight: 300, alignment: .leading)
|
||||
.lineLimit(-1)
|
||||
ImageStore.shared.image(name: imgName, size: 200)
|
||||
.padding(.bottom, 10)
|
||||
}
|
||||
.padding(.leading, -20)
|
||||
|
||||
HStack(alignment: .center){
|
||||
CircleImage(imgName: userIcon)
|
||||
.padding(.leading, 20)
|
||||
Text(nickName)
|
||||
.font(Font.system(size: 14))
|
||||
.bold()
|
||||
Text("发布")
|
||||
.font(Font.system(size: 13))
|
||||
.color(Color.gray)
|
||||
Spacer()
|
||||
}
|
||||
|
||||
}
|
||||
Divider()
|
||||
.padding(.horizontal,20)
|
||||
HStack{
|
||||
Image("dianzan")
|
||||
Spacer()
|
||||
Image("pinglun")
|
||||
Spacer()
|
||||
Image("share")
|
||||
Spacer()
|
||||
Image("shenglue")
|
||||
}
|
||||
.padding(.leading, 20)
|
||||
.padding(.trailing, 20)
|
||||
Color(red: 240.0/255.0, green: 243.0/255.0, blue: 245.0/255.0)
|
||||
.frame(height: CGFloat(1.0))
|
||||
}
|
||||
.frame(height:450)
|
||||
}
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
struct HomeCell_Previews : PreviewProvider {
|
||||
static var previews: some View {
|
||||
HomeCell(zoneName: "人人都爱宝可梦", zoneImgName: "30_Fotor", userIcon: "pokemon", nickName: "皮卡丘", timeStamp: "2小时前",content: "蒜头丘!\n皮卡皮卡₍₍ (̨̡ ‾᷄ᗣ‾᷅ )̧̢ ₎₎", imgName: "kcc"
|
||||
)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
38
Examples/Jike/SwiftUI_Jike/Cell/SettingCell.swift
Executable file
@@ -0,0 +1,38 @@
|
||||
//
|
||||
// SettingCell.swift
|
||||
// SwiftUI_Jike
|
||||
//
|
||||
// Created by alexyang on 2019/6/5.
|
||||
// Copyright © 2019 alexyang. All rights reserved.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct SettingCell : View {
|
||||
var imageName:String
|
||||
var title:String
|
||||
var body: some View {
|
||||
VStack{
|
||||
HStack(){
|
||||
Image(imageName)
|
||||
Text(title)
|
||||
Spacer()
|
||||
}
|
||||
.padding(.top, 5)
|
||||
.frame(height: 44)
|
||||
.padding(.horizontal, 15)
|
||||
Spacer()
|
||||
Color(red: 240.0/255.0, green: 243.0/255.0, blue: 245.0/255.0)
|
||||
.frame(height: 1)
|
||||
}
|
||||
.frame(height: 50)
|
||||
}
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
struct SettingCell_Previews : PreviewProvider {
|
||||
static var previews: some View {
|
||||
SettingCell(imageName: "setting_quanzi", title: "我的圈子")
|
||||
}
|
||||
}
|
||||
#endif
|
||||
32
Examples/Jike/SwiftUI_Jike/Cell/ZoneCell.swift
Executable file
@@ -0,0 +1,32 @@
|
||||
//
|
||||
// ZoneCell.swift
|
||||
// SwiftUI_Jike
|
||||
//
|
||||
// Created by alexyang on 2019/6/5.
|
||||
// Copyright © 2019 alexyang. All rights reserved.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct ZoneCell : View {
|
||||
var imgName:String
|
||||
var title:String
|
||||
var body: some View {
|
||||
VStack{
|
||||
Image(imgName)
|
||||
Text(title)
|
||||
.font(Font.system(size: 10))
|
||||
.color(Color.gray)
|
||||
.frame(alignment: .center)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
struct ZoneCell_Previews : PreviewProvider {
|
||||
static var previews: some View {
|
||||
ZoneCell(imgName: "pokemon", title: "苹果产品爱好者")
|
||||
}
|
||||
}
|
||||
#endif
|
||||
52
Examples/Jike/SwiftUI_Jike/ChatView.swift
Executable file
@@ -0,0 +1,52 @@
|
||||
//
|
||||
// ChatView.swift
|
||||
// SwiftUI_Jike
|
||||
//
|
||||
// Created by alexyang on 2019/6/5.
|
||||
// Copyright © 2019 alexyang. All rights reserved.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct ChatView : View {
|
||||
var body: some View {
|
||||
VStack{
|
||||
VStack{
|
||||
HStack{
|
||||
Spacer()
|
||||
Text("聊天").bold()
|
||||
.padding(.leading, 44)
|
||||
Spacer()
|
||||
Image("discovery_icon")
|
||||
.padding(.horizontal, 10)
|
||||
}
|
||||
Color(red: 240.0/255.0, green: 243.0/255.0, blue: 245.0/255)
|
||||
.frame(height: 1)
|
||||
}
|
||||
Group() {
|
||||
ChatCell(imageName: "chat_box", title: "招呼",subTitle: "和XX等人的9999个招呼")
|
||||
HStack{
|
||||
Color(red: 240.0/255.0, green: 243.0/255.0, blue: 245.0/255)
|
||||
.frame(height: 10.0)
|
||||
}
|
||||
|
||||
ChatCell(imageName: "subIcon", title: "墨小埋",subTitle: "[有事找你]")
|
||||
Divider()
|
||||
ChatCell(imageName: "subIcon", title: "墨小埋",subTitle: "[有事找你]")
|
||||
Divider()
|
||||
ChatCell(imageName: "subIcon", title: "墨小埋",subTitle: "[有事找你]")
|
||||
Divider()
|
||||
}
|
||||
Spacer()
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
struct ChatView_Previews : PreviewProvider {
|
||||
static var previews: some View {
|
||||
ChatView()
|
||||
}
|
||||
}
|
||||
#endif
|
||||
40
Examples/Jike/SwiftUI_Jike/ContentView.swift
Executable file
@@ -0,0 +1,40 @@
|
||||
//
|
||||
// ContentView.swift
|
||||
// SwiftUI_Jike
|
||||
//
|
||||
// Created by alexyang on 2019/6/5.
|
||||
// Copyright © 2019 alexyang. All rights reserved.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct ContentView : View {
|
||||
|
||||
var body: some View {
|
||||
|
||||
GYTabView([Text("233")], titles: ["首页","动态","聊天","我的"],
|
||||
images: ["tab_home_normal",
|
||||
"tab_status_normal",
|
||||
"tab_chat_normal",
|
||||
"tab_me_normal"],
|
||||
imageSels: ["tab_home_select",
|
||||
"tab_status_select",
|
||||
"tab_chat_select",
|
||||
"tab_me_select"])
|
||||
.edgesIgnoringSafeArea(.top)
|
||||
}
|
||||
|
||||
func getIndex(item: TabBarItem) -> Int {
|
||||
return 0
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
struct ContentView_Previews : PreviewProvider {
|
||||
static var previews: some View {
|
||||
ContentView()
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
||||
60
Examples/Jike/SwiftUI_Jike/GYTabBarViewController.swift
Executable file
@@ -0,0 +1,60 @@
|
||||
//
|
||||
// GYTabBarViewController.swift
|
||||
// SegmentDemo
|
||||
//
|
||||
// Created by alexyang on 2019/6/6.
|
||||
// Copyright © 2019 alexyang. All rights reserved.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct GYTabBarViewController : UIViewControllerRepresentable {
|
||||
|
||||
func makeCoordinator() -> GYTabBarViewController.Coordinator {
|
||||
Coordinator(self)
|
||||
}
|
||||
|
||||
var titles:[String]
|
||||
var imgs:[String]
|
||||
var imgSels:[String]
|
||||
var controllers:[UIViewController]
|
||||
|
||||
func makeUIViewController(context: Context) -> UITabBarController {
|
||||
|
||||
let tabBar = UITabBarController()
|
||||
var index:Int = 0
|
||||
let attributes = [NSAttributedString.Key.foregroundColor: UIColor.black]
|
||||
for vc in controllers {
|
||||
let title = titles[index]
|
||||
let image = UIImage(named: imgs[index])
|
||||
let imgSel = UIImage(named: imgSels[index])
|
||||
let tabBarItem = UITabBarItem(title: title, image: image, selectedImage: imgSel)
|
||||
tabBarItem.setTitleTextAttributes(attributes, for: .selected)
|
||||
vc.tabBarItem = tabBarItem
|
||||
index += 1
|
||||
}
|
||||
tabBar.viewControllers = controllers
|
||||
tabBar.delegate = context.coordinator
|
||||
return tabBar
|
||||
}
|
||||
|
||||
func updateUIViewController(_ tabBarVC: UITabBarController, context: Context) {
|
||||
tabBarVC.setViewControllers(controllers, animated: true)
|
||||
}
|
||||
|
||||
class Coordinator: NSObject, UITabBarControllerDelegate {
|
||||
var parent: GYTabBarViewController
|
||||
|
||||
init(_ tabBarVC: GYTabBarViewController) {
|
||||
self.parent = tabBarVC
|
||||
}
|
||||
|
||||
func tabBarController(_ tabBarController: UITabBarController, didSelect viewController: UIViewController) {
|
||||
|
||||
}
|
||||
|
||||
func tabBarController(_ tabBarController: UITabBarController, shouldSelect viewController: UIViewController) -> Bool {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||