Commit 01df8779 by Daniel Dahan

updated example projects

parent 7b486a9b
......@@ -262,6 +262,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Bar/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.cosmicmind.Bar;
......@@ -274,6 +275,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Bar/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.cosmicmind.Bar;
......
......@@ -282,6 +282,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = BottomNavigationController/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.cosmicmind.BottomNavigationController;
......@@ -294,6 +295,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = BottomNavigationController/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.cosmicmind.BottomNavigationController;
......
......@@ -45,6 +45,6 @@ class AudioViewController: UIViewController {
open override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = Color.grey.lighten5
view.backgroundColor = Color.blue.base
}
}
......@@ -45,6 +45,6 @@ class PhotoViewController: UIViewController {
open override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = Color.grey.lighten5
view.backgroundColor = Color.red.base
}
}
......@@ -45,6 +45,6 @@ class RemindersViewController: UIViewController {
open override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = Color.grey.lighten5
view.backgroundColor = Color.yellow.base
}
}
......@@ -45,6 +45,6 @@ class SearchViewController: UIViewController {
open override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = Color.grey.lighten5
view.backgroundColor = Color.blueGrey.base
}
}
......@@ -45,6 +45,6 @@ class VideoViewController: UIViewController {
open override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = Color.grey.lighten5
view.backgroundColor = Color.green.base
}
}
......@@ -262,6 +262,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Button/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.cosmicmind.Button;
......@@ -274,6 +275,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Button/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.cosmicmind.Button;
......
......@@ -262,6 +262,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Card/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.cosmicmind.Card;
......@@ -274,6 +275,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Card/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.cosmicmind.Card;
......
......@@ -32,6 +32,10 @@ import UIKit
import Material
class ViewController: UIViewController {
/// Card reference.
private lazy var card: Card = Card()
/// Conent area.
private var contentView: UILabel!
/// Bottom Bar views.
......@@ -60,6 +64,10 @@ class ViewController: UIViewController {
prepareImageCard()
}
override func viewWillLayoutSubviews() {
super.viewWillLayoutSubviews()
}
private func prepareFavoriteButton() {
favoriteButton = FlatButton(image: Icon.favorite, tintColor: Color.grey.base)
favoriteButton.grid.columns = 4
......@@ -123,7 +131,6 @@ class ViewController: UIViewController {
}
private func prepareImageCard() {
let card = Card()
card.toolbar = toolbar
card.contentView = contentView
card.bottomBar = bottomBar
......
......@@ -262,6 +262,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = ImageCard/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.cosmicmind.ImageCard;
......@@ -274,6 +275,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = ImageCard/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.cosmicmind.ImageCard;
......
......@@ -262,6 +262,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Layer/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.cosmicmind.Layer;
......@@ -274,6 +275,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Layer/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.cosmicmind.Layer;
......
......@@ -274,6 +274,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = PageTabBarController/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.cosmicmind.PageTabBarController;
......@@ -286,6 +287,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = PageTabBarController/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.cosmicmind.PageTabBarController;
......
......@@ -41,7 +41,7 @@ class AppPageTabBarController: PageTabBarController {
/// Prepares the pageTabBar.
private func preparePageTabBar() {
pageTabBar.lineColor = Color.purple.base
pageTabBar.lineColor = Color.grey.darken1
}
}
......
......@@ -262,6 +262,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = PresenterCard/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.cosmicmind.PresenterCard;
......@@ -274,6 +275,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = PresenterCard/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.cosmicmind.PresenterCard;
......
......@@ -29,6 +29,9 @@
location = "group:Examples/Programmatic/ImageCard/ImageCard.xcodeproj">
</FileRef>
<FileRef
location = "group:Examples/Programmatic/PresenterCard/PresenterCard.xcodeproj">
</FileRef>
<FileRef
location = "group:Examples/Programmatic/Layer/Layer.xcodeproj">
</FileRef>
<FileRef
......@@ -47,9 +50,6 @@
location = "group:Examples/Programmatic/PhotoLibraryController/PhotoLibraryController.xcodeproj">
</FileRef>
<FileRef
location = "group:Examples/Programmatic/PresenterCard/PresenterCard.xcodeproj">
</FileRef>
<FileRef
location = "group:Examples/Programmatic/RemindersController/RemindersController.xcodeproj">
</FileRef>
<FileRef
......
......@@ -141,7 +141,8 @@ open class BottomNavigationController: UITabBarController, UITabBarControllerDel
open func prepare() {
view.clipsToBounds = true
view.contentScaleFactor = Device.scale
delegate = self
view.backgroundColor = Color.white
delegate = self
prepareTabBar()
}
......
......@@ -117,6 +117,11 @@ open class Card: PulseView {
open override func layoutSubviews() {
super.layoutSubviews()
reload()
}
/// Reloads the layout.
open func reload() {
guard willLayout else {
return
}
......@@ -139,6 +144,7 @@ open class Card: PulseView {
format += "[toolbar]"
views["toolbar"] = v
layout(v).horizontally().height(v.height)
v.grid.reload()
}
if let v = contentView {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment