[go: nahoru, domu]

Skip to content

Commit

Permalink
Merge pull request #16 from mono0926/xcode9
Browse files Browse the repository at this point in the history
Xcode9
  • Loading branch information
mono0926 committed Oct 1, 2017
2 parents f930a4e + ca56669 commit a394197
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 22 deletions.
23 changes: 11 additions & 12 deletions Example/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12120" systemVersion="16F73" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13526" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12088"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13524"/>
<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="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" customModule="Example" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
Expand All @@ -24,7 +22,7 @@
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
</imageView>
<visualEffectView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="hfa-GM-Q6d">
<rect key="frame" x="0.0" y="0.0" width="113" height="300"/>
<rect key="frame" x="0.0" y="20" width="113" height="300"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="BDZ-hc-dGd">
<rect key="frame" x="0.0" y="0.0" width="113" height="300"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
Expand Down Expand Up @@ -117,13 +115,14 @@
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="hfa-GM-Q6d" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leading" id="0RM-xU-GOP"/>
<constraint firstAttribute="trailing" secondItem="Fz1-fx-Fg4" secondAttribute="trailing" id="bXI-xs-htk"/>
<constraint firstItem="hfa-GM-Q6d" firstAttribute="leading" secondItem="K9q-4l-8tN" secondAttribute="leading" id="0RM-xU-GOP"/>
<constraint firstItem="K9q-4l-8tN" firstAttribute="trailing" secondItem="Fz1-fx-Fg4" secondAttribute="trailing" id="bXI-xs-htk"/>
<constraint firstItem="Fz1-fx-Fg4" firstAttribute="top" secondItem="8bC-Xf-vdC" secondAttribute="top" id="i8A-u4-WZj"/>
<constraint firstItem="Fz1-fx-Fg4" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leading" id="kzX-Tr-2Sj"/>
<constraint firstItem="hfa-GM-Q6d" firstAttribute="top" secondItem="8bC-Xf-vdC" secondAttribute="top" id="pa7-yF-d80"/>
<constraint firstItem="wfy-db-euE" firstAttribute="top" secondItem="Fz1-fx-Fg4" secondAttribute="bottom" id="ppt-jj-k2h"/>
<constraint firstItem="Fz1-fx-Fg4" firstAttribute="leading" secondItem="K9q-4l-8tN" secondAttribute="leading" id="kzX-Tr-2Sj"/>
<constraint firstItem="hfa-GM-Q6d" firstAttribute="top" secondItem="K9q-4l-8tN" secondAttribute="top" id="pa7-yF-d80"/>
<constraint firstItem="K9q-4l-8tN" firstAttribute="bottom" secondItem="Fz1-fx-Fg4" secondAttribute="bottom" id="ppt-jj-k2h"/>
</constraints>
<viewLayoutGuide key="safeArea" id="K9q-4l-8tN"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
Expand Down
22 changes: 17 additions & 5 deletions NativePopup.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0830;
LastUpgradeCheck = 0830;
LastUpgradeCheck = 0910;
ORGANIZATIONNAME = mono;
TargetAttributes = {
FE85338A1EAC7C92004BB756 = {
Expand Down Expand Up @@ -351,15 +351,21 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
Expand Down Expand Up @@ -405,15 +411,21 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
Expand Down Expand Up @@ -458,7 +470,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
};
name = Debug;
};
Expand All @@ -477,7 +489,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.mono0926.NativePopup;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
};
name = Release;
};
Expand All @@ -492,7 +504,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.mono0926.Example;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
};
name = Debug;
};
Expand All @@ -507,7 +519,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.mono0926.Example;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
};
name = Release;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0830"
LastUpgradeVersion = "0910"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -26,6 +26,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
Expand All @@ -36,6 +37,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
8 changes: 4 additions & 4 deletions NativePopup/NativePopup.swift
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ public class NativePopup: UIView {
let style = NSMutableParagraphStyle()
style.lineSpacing = 3
style.alignment = .center
$0.attributedText = NSAttributedString(string: $0.text ?? "", attributes: [NSParagraphStyleAttributeName: style])
$0.attributedText = NSAttributedString(string: $0.text ?? "", attributes: [.paragraphStyle: style])
}

effectView.addSubview(imageContentView)
effectView.addSubview(titleLabel)
effectView.contentView.addSubview(imageContentView)
effectView.contentView.addSubview(titleLabel)

imageContentView.heightAnchor.constraint(equalTo: imageContentView.widthAnchor, multiplier: 1).isActive = true
imageContentView.heightAnchor.constraint(equalToConstant: 112).isActive = true
Expand All @@ -99,7 +99,7 @@ public class NativePopup: UIView {
if message?.isEmpty ?? true {
titleLabel.bottomAnchor.constraint(equalTo: bottomAnchor, constant: -bottomSpace).isActive = true
} else {
effectView.addSubview(messageLabel)
effectView.contentView.addSubview(messageLabel)
titleLabel.bottomAnchor.constraint(equalTo: messageLabel.topAnchor, constant: -6).isActive = true
messageLabel.leftAnchor.constraint(equalTo: leftAnchor, constant: sideSpace).isActive = true
messageLabel.rightAnchor.constraint(equalTo: rightAnchor, constant: -sideSpace).isActive = true
Expand Down

0 comments on commit a394197

Please sign in to comment.