Commit 01df8779 by Daniel Dahan

updated example projects

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