Skip to content

Commit

Permalink
Updates readme and others.
Browse files Browse the repository at this point in the history
  • Loading branch information
NikKovIos committed Jun 26, 2019
1 parent 6903b3b commit cd78839
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 29 deletions.
2 changes: 1 addition & 1 deletion Example/ExampleViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class ExampleViewController: UIViewController {
bottomTextField.translatesAutoresizingMaskIntoConstraints = false
scrollView.addSubview(bottomTextField)

let views: [String : Any] = ["bottomTextField": self.bottomTextField]
let views: [String : Any] = ["bottomTextField": bottomTextField!]
let horizontalConstraints = NSLayoutConstraint.constraints(withVisualFormat:
"H:|-15-[bottomTextField]-15-|",
options: [],
Expand Down
2 changes: 1 addition & 1 deletion Example/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.0.3</string>
<string>2.1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
Expand Down
Binary file removed NKVPhonePicker.framework.zip
Binary file not shown.
4 changes: 2 additions & 2 deletions NKVPhonePicker.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@

Pod::Spec.new do |s|
s.name = 'NKVPhonePicker'
s.version = '2.4.0'
s.version = '2.1.0'
s.summary = 'A UITextField subclass to simplify the selection of country codes.'
s.description = <<-DESC
With this pod you can easily select country codes with just making your textFields class - the NKVPhonePickerTextField.
Support formatting phone to a specific pattern. Can select countries from the list.
DESC

s.homepage = 'https://github.com/NikKovIos/NKVPhonePicker'
s.ios.deployment_target = '9.0'
s.ios.deployment_target = '10.0'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'Nik Kov' => '[email protected]' }
s.source = {
Expand Down
6 changes: 2 additions & 4 deletions NKVPhonePicker.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -480,7 +480,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
Expand Down Expand Up @@ -538,7 +538,6 @@
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = NKVPhonePicker/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 11.3;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.nikkov.NKVPhonePicker;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
Expand Down Expand Up @@ -569,7 +568,6 @@
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = NKVPhonePicker/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 11.3;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.nikkov.NKVPhonePicker;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
Expand Down
2 changes: 1 addition & 1 deletion NKVPhonePicker/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.0.2</string>
<string>2.1.0</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
Expand Down
28 changes: 8 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<br />

![Platform](https://img.shields.io/badge/platform-ios-blue.svg?style=flat)
![Swift version](https://img.shields.io/badge/Swift-4.2-orange.svg?style=flat)
![Swift version](https://img.shields.io/badge/Swift-5-orange.svg?style=flat)
![License](https://img.shields.io/badge/license-MIT-lightgrey.svg?style=flat)
[![CocoaPods](https://img.shields.io/cocoapods/v/NKVPhonePicker.svg)](https://cocoapods.org/pods/NKVPhonePicker)
[![CocoaPods](https://img.shields.io/cocoapods/dm/NKVPhonePicker.svg)](https://cocoapods.org/pods/NKVPhonePicker)
Expand All @@ -28,6 +28,8 @@ pod try NKVPhonePicker
```
*(don't forget to update your cocoapods master repo)*

For swift 4.2 version use `011f7090e69a8446aadd21531e4b83da745cd2d4` in `master` branch.

If you're still using Swift 2.x - you can set (The development for swift_2.x is deprecated. Stale version still exists.)
```ruby
pod 'NKVPhonePicker', :git => "https://github.com/NikKovIos/NKVPhonePicker.git", :branch => "Swift_2.x"
Expand Down Expand Up @@ -72,25 +74,11 @@ bottomTextField.font = UIFont.boldSystemFont(ofSize: 25)
bottomTextField.textColor = UIColor.white
bottomTextField.textFieldTextInsets = UIEdgeInsets(top: 0, left: 20, bottom: 0, right: 0)
bottomTextField.translatesAutoresizingMaskIntoConstraints = false
self.view.addSubview(bottomTextField)

let views: [String : Any] = ["bottomTextField": self.bottomTextField]
let horizontalConstraints = NSLayoutConstraint.constraints(withVisualFormat:
"H:|-15-[bottomTextField]-15-|",
options: [],
metrics: nil,
views: views)

let verticalConstraints = NSLayoutConstraint.constraints(withVisualFormat:
"V:|-(>=0)-[bottomTextField(30)]-15-|",
options: [],
metrics: nil,
views: views)

view.addConstraints(horizontalConstraints)
view.addConstraints(verticalConstraints)
view.addConstraints(horizontalConstraints)
view.addConstraints(verticalConstraints)

// prefilling
let source = NKVSource(countryCode: "ru")
bottomTextField.setCurrentCountryInitially = false
bottomTextField.preFillText(source: source, number: 7999432423)
}
```

Expand Down

0 comments on commit cd78839

Please sign in to comment.