This commit is contained in:
Ivan Vorobei
2019-06-06 22:36:07 +03:00
parent 6d351cf167
commit 27a7f9fae6
129 changed files with 2634 additions and 1 deletions

View File

@@ -0,0 +1,26 @@
//
// Datas.swift
// SwiftUI_Jike
//
// Created by alexyang on 2019/6/5.
// Copyright © 2019 alexyang. All rights reserved.
//
import SwiftUI
let tabItems: [TabBarItem] = getTabItems()
func getTabItems() -> [TabBarItem] {
var items = [TabBarItem]()
let item0 = TabBarItem(id: 0, title: "首页", image: "tab_home_normal", imageSelect: "tab_home_select")
items.append(item0)
let item1 = TabBarItem(id: 1, title: "动态", image: "tab_status_normal", imageSelect: "tab_status_select")
items.append(item1)
let item2 = TabBarItem(id: 2, title: "聊天", image: "tab_chat_normal", imageSelect: "tab_chat_select")
items.append(item2)
let item3 = TabBarItem(id: 3, title: "我的", image: "tab_me_normal", imageSelect: "tab_me_select")
items.append(item3)
return items
}

View File

@@ -0,0 +1,16 @@
//
// TabBarModel.swift
// SwiftUI_Jike
//
// Created by alexyang on 2019/6/6.
// Copyright © 2019 alexyang. All rights reserved.
//
import SwiftUI
struct TabBarItem: Hashable, Codable, Identifiable {
var id: Int
var title: String
var image: String
var imageSelect: String
}

View File

@@ -0,0 +1,16 @@
//
// TabIconInfo.swift
// SwiftUI_Jike
//
// Created by alexyang on 2019/6/5.
// Copyright © 2019 alexyang. All rights reserved.
//
import SwiftUI
struct TabIcon: Hashable, Codable, Identifiable {
var id: Int
var title: String
var imgName: String
}

View File

@@ -0,0 +1,19 @@
/*
See LICENSE folder for this samples licensing information.
Abstract:
The model for an individual landmark.
*/
import SwiftUI
struct ZoneModel: Hashable, Codable, Identifiable {
var id: Int
var name: String
var imageName: String
var category: String
func image(forSize size: Int) -> Image {
ImageStore.shared.image(name: imageName, size: size)
}
}