Skip to content

Commit f2f86cf

Browse files
committed
Merge branch 'master' of https://github.com/comcxx11/SpringText
2 parents 168fc37 + 4838d1e commit f2f86cf

File tree

3 files changed

+49
-14
lines changed

3 files changed

+49
-14
lines changed

.github/workflows/main.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: SpringText CI
4+
5+
# Controls when the action will run. Triggers the workflow on push or pull request
6+
# events but only for the master branch
7+
on:
8+
push:
9+
branches:
10+
- master
11+
- hotfix
12+
pull_request:
13+
branches:
14+
- '*'
15+
16+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
17+
jobs:
18+
name: Test iOS
19+
runs-on: macOS-latest
20+
env:
21+
DEVELOPER_DIR: /Applications/Xcode_12.app/Contents/Developer
22+
strategy:
23+
matrix:
24+
destination: ["OS=14.0,name=iPhone 11 Pro"] #, "OS=12.4,name=iPhone XS", "OS=11.4,name=iPhone X", "OS=10.3.1,name=iPhone SE"]
25+
steps:
26+
- uses: actions/checkout@v2
27+
- name: iOS - ${{ matrix.destination }}
28+
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -project "SpringText.xcodeproj" -scheme "SpringText-Example" -destination "${{ matrix.destination }}" clean test | xcpretty

.travis.yml

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
# references:
2-
# * https://www.objc.io/issues/6-build-tools/travis-ci/
3-
# * https://github.com/supermarin/xcpretty#usage
4-
5-
osx_image: xcode7.3
6-
language: objective-c
7-
# cache: cocoapods
8-
# podfile: Example/Podfile
9-
# before_install:
10-
# - gem install cocoapods # Since Travis is not always on latest version
11-
# - pod install --project-directory=Example
12-
script:
13-
- set -o pipefail && xcodebuild test -enableCodeCoverage YES -workspace Example/SpringText.xcworkspace -scheme SpringText-Example -sdk iphonesimulator9.3 ONLY_ACTIVE_ARCH=NO | xcpretty
14-
- pod lib lint
1+
env:
2+
global:
3+
- LC_CTYPE=en_US.UTF-8
4+
matrix:
5+
include:
6+
- os: osx
7+
language: swift
8+
osx_image: xcode11.7
9+
script:
10+
- set -o pipefail
11+
- xcodebuild -project SpringText.xcodeproj -scheme SpringText-Example -sdk iphonesimulator

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# SpringText
22

3+
[![Language](https://img.shields.io/badge/Swift-4%20%26%205-orange.svg)]()
34
[![CI Status](https://img.shields.io/travis/comcxx11/SpringText.svg?style=flat)](https://travis-ci.org/comcxx11/SpringText)
45
[![Version](https://img.shields.io/cocoapods/v/SpringText.svg?style=flat)](https://cocoapods.org/pods/SpringText)
56
[![License](https://img.shields.io/cocoapods/l/SpringText.svg?style=flat)](https://cocoapods.org/pods/SpringText)
@@ -15,10 +16,19 @@ To run the example project, clone the repo, and run `pod install` from the Examp
1516
- iOS 9.3
1617

1718
## Usage
19+
20+
The usage is very similar to `UITextField` text properties.
21+
`SPLabel` has two options: Normal, Currency
1822
```swift
1923
lblAmount.text(num:192398)
2024
```
2125

26+
Default currency symbol is `dollor` sign `$`
27+
```swift
28+
lblAmount.setCurrency(symbol: "")
29+
lblAmount.text(num:192398, showCurrency:true)
30+
```
31+
2232
## Installation
2333

2434
SpringText is available through [CocoaPods](https://cocoapods.org). To install

0 commit comments

Comments
 (0)