Commit bc09da94 by Daniel Dahan

Fixed issue in NavigationBarView storyboards example, where height of…

Fixed issue in NavigationBarView storyboards example, where height of NavigationBarView was not adjusting on Landscape view.
parent 7004b182
......@@ -7,6 +7,8 @@
objects = {
/* Begin PBXBuildFile section */
9656265B1C87F57C004ADEF7 /* Material.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9656265A1C87F57C004ADEF7 /* Material.framework */; };
9656265C1C87F57C004ADEF7 /* Material.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9656265A1C87F57C004ADEF7 /* Material.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
96D88C831C132C1800B91418 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96D88C821C132C1800B91418 /* AppDelegate.swift */; };
96D88C851C132C1800B91418 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96D88C841C132C1800B91418 /* ViewController.swift */; };
96D88C8A1C132C1800B91418 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 96D88C891C132C1800B91418 /* Assets.xcassets */; };
......@@ -20,6 +22,7 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
9656265C1C87F57C004ADEF7 /* Material.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
......@@ -27,6 +30,7 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
9656265A1C87F57C004ADEF7 /* Material.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; name = Material.framework; path = "/Users/danieldahan/Library/Developer/Xcode/DerivedData/Material-hbpnflxhoouqxebjcyhbbhqyesjd/Build/Products/Debug-iphoneos/Material.framework"; sourceTree = "<absolute>"; };
96D88C7F1C132C1800B91418 /* NavigationBarView.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = NavigationBarView.app; sourceTree = BUILT_PRODUCTS_DIR; };
96D88C821C132C1800B91418 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
96D88C841C132C1800B91418 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
......@@ -40,6 +44,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
9656265B1C87F57C004ADEF7 /* Material.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -49,6 +54,7 @@
96D88C761C132C1800B91418 = {
isa = PBXGroup;
children = (
9656265A1C87F57C004ADEF7 /* Material.framework */,
96D88C811C132C1800B91418 /* NavigationBarView */,
96D88C801C132C1800B91418 /* Products */,
);
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9531" systemVersion="15C50" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9532" systemVersion="15C50" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9530"/>
</dependencies>
<scenes>
<!--View Controller-->
......@@ -33,6 +33,7 @@
</view>
<connections>
<outlet property="navigationBarView" destination="est-za-GAc" id="3ly-Ta-1qf"/>
<outlet property="navigationBarViewHeightConstraint" destination="dve-99-fA0" id="hkR-r9-Oc3"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
......
......@@ -41,9 +41,9 @@ class ViewController: UIViewController {
override func willRotateToInterfaceOrientation(toInterfaceOrientation: UIInterfaceOrientation, duration: NSTimeInterval) {
// if landscape
if UIInterfaceOrientationIsLandscape(toInterfaceOrientation) {
navigationBarViewHeightConstraint?.constant = 44
navigationBarViewHeightConstraint?.constant = .iPad == MaterialDevice.type ? navigationBarView!.heightForPortraitOrientation : navigationBarView!.heightForLandscapeOrientation
} else {
navigationBarViewHeightConstraint?.constant = 64
navigationBarViewHeightConstraint?.constant = navigationBarView!.heightForPortraitOrientation
}
}
......@@ -86,7 +86,6 @@ class ViewController: UIViewController {
// Menu button.
let img1: UIImage? = UIImage(named: "ic_menu_white")
let btn1: FlatButton = FlatButton()
btn1.pulseColor = nil
btn1.pulseScale = false
btn1.setImage(img1, forState: .Normal)
btn1.setImage(img1, forState: .Highlighted)
......@@ -94,7 +93,6 @@ class ViewController: UIViewController {
// Star button.
let img2: UIImage? = UIImage(named: "ic_star_white")
let btn2: FlatButton = FlatButton()
btn2.pulseColor = nil
btn2.pulseScale = false
btn2.setImage(img2, forState: .Normal)
btn2.setImage(img2, forState: .Highlighted)
......@@ -102,7 +100,6 @@ class ViewController: UIViewController {
// Search button.
let img3: UIImage? = UIImage(named: "ic_search_white")
let btn3: FlatButton = FlatButton()
btn3.pulseColor = nil
btn3.pulseScale = false
btn3.setImage(img3, forState: .Normal)
btn3.setImage(img3, forState: .Highlighted)
......
Pod::Spec.new do |s|
s.name = 'Material'
s.version = '1.35.1'
s.version = '1.35.2'
s.license = 'BSD'
s.summary = 'Express your creativity with Material, an animation and graphics framework for Google\'s Material Design and Apple\'s Flat UI in Swift.'
s.homepage = 'http://cosmicmind.io'
......
......@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.35.1</string>
<string>1.35.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
......
......@@ -75,9 +75,7 @@ public class NavigationBarView : StatusBarView {
public override func layoutSubviews() {
super.layoutSubviews()
if willRenderView {
// TitleView alignment.
if let v: UILabel = titleLabel {
if let d: UILabel = detailLabel {
......@@ -106,6 +104,7 @@ public class NavigationBarView : StatusBarView {
contentView.grid.views?.append(v)
}
grid.reloadLayout()
contentView.grid.reloadLayout()
}
}
......
......@@ -89,6 +89,7 @@ public class SearchBarView : StatusBarView {
super.layoutSubviews()
if willRenderView {
contentView.grid.views?.append(textField)
contentView.grid.reloadLayout()
textField.font = textField.font?.fontWithSize(20)
textField.reloadView()
}
......
......@@ -70,6 +70,7 @@ public class StatusBarView : ControlView {
grid.axis.columns = Int(width / 48)
// We can call super now that we have a width.
super.layoutSubviews()
// General alignment.
......
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