Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Swift 4 #18

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ xcuserdata/
*.moved-aside
*.xccheckout
*.xcscmblueprint
.DS_Store

## Obj-C/Swift specific
*.hmap
Expand Down
162 changes: 127 additions & 35 deletions Example/Example/Example.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

6 changes: 2 additions & 4 deletions Example/Example/Example/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@ import UIKit
class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?


func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch.

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool {
return true
}

Expand Down
21 changes: 12 additions & 9 deletions Example/Example/Example/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10116" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13527"/>
<capability name="Navigation items with more than one left or right bar item" minToolsVersion="7.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
Expand All @@ -15,11 +19,11 @@
<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="600" height="600"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<navigationBar contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="2SF-t7-qL5">
<rect key="frame" x="0.0" y="0.0" width="600" height="44"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="At2-YV-cl1"/>
<constraint firstAttribute="height" constant="44" id="UlQ-au-Omg"/>
Expand All @@ -42,7 +46,7 @@
<action selector="onRefreshColor:" destination="BYZ-38-t0r" id="55q-7O-fFG"/>
</connections>
</barButtonItem>
<barButtonItem title="Item" systemItem="refresh" id="DBA-ss-GgL">
<barButtonItem systemItem="refresh" id="DBA-ss-GgL">
<connections>
<action selector="onRefreshFont:" destination="BYZ-38-t0r" id="OxQ-lh-zLU"/>
</connections>
Expand Down Expand Up @@ -72,14 +76,13 @@
</variation>
</navigationBar>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" verticalCompressionResistancePriority="749" image="bridge" translatesAutoresizingMaskIntoConstraints="NO" id="8dV-8z-18R" customClass="JLStickerImageView" customModule="JLStickerTextView">
<rect key="frame" x="0.0" y="44" width="600" height="556"/>
<rect key="frame" x="0.0" y="111" width="375" height="556"/>
<constraints>
<constraint firstAttribute="width" constant="600" id="Hd9-u0-oD9"/>
<constraint firstAttribute="height" constant="556" id="nrm-L0-6xH"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="wfy-db-euE" firstAttribute="top" secondItem="8dV-8z-18R" secondAttribute="bottom" id="0bR-E3-xZi"/>
<constraint firstItem="8dV-8z-18R" firstAttribute="top" secondItem="2SF-t7-qL5" secondAttribute="bottom" id="330-o6-1hD"/>
Expand Down
8 changes: 4 additions & 4 deletions Example/Example/Example/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import UIKit
import JLStickerTextView

class ViewController: UIViewController {
var colorsArray = [UIColor.white(), UIColor.black(), UIColor.yellow()]
var colorsArray = [UIColor.white, UIColor.black, UIColor.yellow]
var fontNamesArray = ["AcademyEngravedLetPlain", "AlNile-Bold", "Chalkduster"]
var textAlphaArray = [0.3, 0.6, 1.0]
var lineSpacings = [1,30,50]
Expand Down Expand Up @@ -54,11 +54,11 @@ class ViewController: UIViewController {
stickerView.addLabel()

//Modify the Label
stickerView.textColor = UIColor.white()
stickerView.textColor = UIColor.white
stickerView.textAlpha = 1
stickerView.currentlyEditingLabel.closeView!.image = UIImage(named: "cancel")
stickerView.currentlyEditingLabel.rotateView?.image = UIImage(named: "rotate")
stickerView.currentlyEditingLabel.border?.strokeColor = UIColor.white().cgColor
stickerView.currentlyEditingLabel.border?.strokeColor = UIColor.white.cgColor

}

Expand All @@ -67,7 +67,7 @@ class ViewController: UIViewController {
let shadowOffset = shadowOffsets[Int(index)]

stickerView.textShadowOffset = CGSize(width: CGFloat(shadowOffset), height: 10)
stickerView.textShadowColor = UIColor.red()
stickerView.textShadowColor = UIColor.red
}


Expand Down
19 changes: 16 additions & 3 deletions Example/Example/Podfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
use_frameworks!
pod "JLStickerTextView", :git =>
"https://github.com/luiyezheng/JLStickerTextView.git"
# Uncomment the next line to define a global platform for your project
platform :ios, '10.0'

target 'Example' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!

# Pods for Example
pod "JLStickerTextView", :git => "https://github.com/luiyezheng/JLStickerTextView.git"

target 'ExampleTests' do
inherit! :search_paths
# Pods for testing
end

end
16 changes: 9 additions & 7 deletions Example/Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
PODS:
- JLStickerTextView (0.1.1)
- JLStickerTextView (0.1.2)

DEPENDENCIES:
- JLStickerTextView (from `https://github.com/luiyezheng/JLStickerTextView.git`)
- JLStickerTextView (from `https://github.com/FrediWeber/JLStickerTextView.git`)

EXTERNAL SOURCES:
JLStickerTextView:
:git: https://github.com/luiyezheng/JLStickerTextView.git
:git: https://github.com/FrediWeber/JLStickerTextView.git

CHECKOUT OPTIONS:
JLStickerTextView:
:commit: 59fe30b3ff13da71c5e263a58518cad4d2ca02af
:git: https://github.com/luiyezheng/JLStickerTextView.git
:commit: 503436a6fa2a1dc11afe2a47d1eb19ea2daf702c
:git: https://github.com/FrediWeber/JLStickerTextView.git

SPEC CHECKSUMS:
JLStickerTextView: 830123837eb0ac93de76759725eb4779a8ff280b
JLStickerTextView: 99158380c95dc5455568892beb81d0529f3a547d

COCOAPODS: 0.39.0
PODFILE CHECKSUM: 3aefea575854fb1036bb2622eda26b3b400fa05f

COCOAPODS: 1.3.1
122 changes: 80 additions & 42 deletions Example/Example/Pods/JLStickerTextView/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading