Skip to content

Commit

Permalink
Merge branch 'release-3.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
gooichi committed Nov 11, 2018
2 parents 409be98 + 5330199 commit 6c9dbd9
Show file tree
Hide file tree
Showing 13 changed files with 52 additions and 47 deletions.
54 changes: 27 additions & 27 deletions .dir-locals.el
@@ -1,15 +1,24 @@
;;; Directory Local Variables
;;; For more information see (info "(emacs) Directory Variables")

((nil
. ((eval . (setenv "DEVELOPER_DIR"
"/Applications/Xcode.app/Contents/Developer"))
(fill-column . 80)
(whitespace-style . (face lines indentation:space))
(eval . (set (make-local-variable 'project-dir)
(file-name-directory
(let ((d (dir-locals-find-file ".")))
(if (stringp d) d (car d))))))))
(("InsetLabelExample/InsetLabelExampleTests"
. ((swift-mode
. ((flycheck-swift3-conditional-compilation-flags . ("DISABLE_TESTABLE"))
(eval . (add-to-list
'flycheck-swift3-framework-search-paths
(expand-file-name
"Platforms/iPhoneOS.platform/Developer/Library/Frameworks"
(getenv "DEVELOPER_DIR"))))
(eval . (set 'flycheck-swift3-inputs
(append library-sources example-sources)))))))
("InsetLabelExample/InsetLabelExample"
. ((swift-mode
. ((flycheck-swift3-module-name . "InsetLabelExample")
(eval . (set 'flycheck-swift3-inputs
(append library-sources example-sources)))))))
("InsetLabel"
. ((swift-mode
. ((eval . (set 'flycheck-swift3-inputs library-sources))))))
(swift-mode
. ((flycheck-swift3-xcrun-sdk . "iphoneos")
(flycheck-swift3-target . "arm64-apple-ios8")
Expand All @@ -24,21 +33,12 @@
(eval . (set (make-local-variable 'example-sources)
(directory-files-recursively example-root
"^[^.].*\\.swift\\'")))))
("InsetLabel"
. ((swift-mode
. ((eval . (set 'flycheck-swift3-inputs library-sources))))))
("InsetLabelExample/InsetLabelExample"
. ((swift-mode
. ((flycheck-swift3-module-name . "InsetLabelExample")
(eval . (set 'flycheck-swift3-inputs
(append library-sources example-sources)))))))
("InsetLabelExample/InsetLabelExampleTests"
. ((swift-mode
. ((flycheck-swift3-conditional-compilation-flags . ("DISABLE_TESTABLE"))
(eval . (add-to-list
'flycheck-swift3-framework-search-paths
(expand-file-name
"Platforms/iPhoneOS.platform/Developer/Library/Frameworks"
(getenv "DEVELOPER_DIR"))))
(eval . (set 'flycheck-swift3-inputs
(append library-sources example-sources))))))))
(nil
. ((eval . (setenv "DEVELOPER_DIR"
"/Applications/Xcode.app/Contents/Developer"))
(fill-column . 80)
(whitespace-style . (face lines indentation:space))
(eval . (set (make-local-variable 'project-dir)
(file-name-directory
(let ((d (or (dir-locals-find-file ".") default-directory)))
(if (stringp d) d (car d)))))))))
2 changes: 1 addition & 1 deletion .swift-version
@@ -1 +1 @@
4.1
4.2
6 changes: 3 additions & 3 deletions .travis.yml
@@ -1,8 +1,8 @@
language: objective-c
osx_image: xcode9.3
language: swift
osx_image: xcode10.1
xcode_project: InsetLabelExample/InsetLabelExample.xcodeproj
xcode_scheme: InsetLabelExample
xcode_sdk: iphonesimulator11.3
xcode_sdk: iphonesimulator12.1
before_install:
- gem install xcpretty
script:
Expand Down
4 changes: 2 additions & 2 deletions InsetLabel.podspec
@@ -1,10 +1,10 @@
Pod::Spec.new do |s|
s.name = 'InsetLabel'
s.version = '2.0.3'
s.version = '3.0.0'
s.author = 'GyazSquare'
s.license = { :type => 'MIT' }
s.homepage = 'https://github.com/GyazSquare/InsetLabel'
s.source = { :git => 'https://github.com/GyazSquare/InsetLabel.git', :tag => 'v2.0.3' }
s.source = { :git => 'https://github.com/GyazSquare/InsetLabel.git', :tag => 'v3.0.0' }
s.summary = 'A UILabel subclass supporting content insets written in Swift.'
s.ios.deployment_target = '8.0'
s.tvos.deployment_target = '9.0'
Expand Down
2 changes: 1 addition & 1 deletion InsetLabel/InsetLabel.swift
Expand Up @@ -77,7 +77,7 @@ open class InsetLabel: UILabel {
// MARK: UILabel

override open func drawText(in rect: CGRect) {
let newRect = UIEdgeInsetsInsetRect(rect, contentInsets)
let newRect = rect.inset(by: contentInsets)
super.drawText(in: newRect)
}

Expand Down
8 changes: 4 additions & 4 deletions InsetLabelExample/InsetLabelExample.xcodeproj/project.pbxproj
Expand Up @@ -262,7 +262,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.InsetLabelExampleTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/InsetLabelExample.app/InsetLabelExample";
};
name = Debug;
Expand All @@ -275,7 +275,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.InsetLabelExampleTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/InsetLabelExample.app/InsetLabelExample";
};
name = Release;
Expand Down Expand Up @@ -390,7 +390,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.InsetLabelExample;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
Expand All @@ -402,7 +402,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.InsetLabelExample;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Release;
};
Expand Down
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict/>
</plist>
2 changes: 1 addition & 1 deletion InsetLabelExample/InsetLabelExample/AppDelegate.swift
Expand Up @@ -13,7 +13,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

// MARK: UIApplicationDelegate

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
return true
}
}
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12120" systemVersion="16E195" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12088"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
Expand Down
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12120" systemVersion="16E195" 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="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12088"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
Expand Down
2 changes: 1 addition & 1 deletion InsetLabelExample/InsetLabelExample/ViewController.swift
Expand Up @@ -19,7 +19,7 @@ class ViewController: UIViewController {
labels.forEach {
if (sender.isOn) {
let inset = $0.font.pointSize / 4
$0.contentInsets = UIEdgeInsetsMake(inset, inset, inset, inset)
$0.contentInsets = UIEdgeInsets(top: inset, left: inset, bottom: inset, right: inset)
} else {
$0.contentInsets = .zero
}
Expand Down
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -9,8 +9,8 @@ InsetLabel is a UILabel subclass supporting content insets written in Swift.

## Requirements

* Xcode 9.3 (Swift 4.1) or later
* Base SDK: iOS 11.3 / tvOS 11.3 or later
* Xcode 10.1 (Swift 4.2) or later
* Base SDK: iOS 12.1 / tvOS 12.1 or later
* Deployment Target: iOS 8.0 / tvOS 9.0 or later

## Installation
Expand Down
2 changes: 1 addition & 1 deletion scripts/travis-run-tests.sh
Expand Up @@ -3,7 +3,7 @@
set -ev
set -o pipefail

IOS_SIMULATOR_ID=`xcrun instruments -s devices 2>/dev/null | sed -n -E 's/^iPhone 8 \(11\.3\)[^+]*\[([[:xdigit:]-]{36})\].*\(Simulator\)$/\1/p' | sed -n -e 1p`
IOS_SIMULATOR_ID=`xcrun instruments -s devices 2>/dev/null | sed -n -E 's/^iPhone XR \(12\.1\)[^+]*\[([[:xdigit:]-]{36})\].*\(Simulator\)$/\1/p' | sed -n -e 1p`

if [ "${TRAVIS_XCODE_PROJECT-UNDEF}" != "UNDEF" ]; then
xcodebuild -project ${TRAVIS_XCODE_PROJECT} -scheme ${TRAVIS_XCODE_SCHEME} -destination "id=${IOS_SIMULATOR_ID}" -sdk ${TRAVIS_XCODE_SDK} test
Expand Down

0 comments on commit 6c9dbd9

Please sign in to comment.