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

Added pod #97

Open
wants to merge 5 commits into
base: new
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fixed TelegramPicker bug
artsimonyan23 committed Nov 12, 2019
commit d383e6f3b63b837ac6787b249227d07c90f663bc
54 changes: 27 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
</div>

<p align="center">
<img src="https://img.shields.io/badge/Swift-4.0-orange.svg" alt="Swift 4.0"/>
<img src="https://img.shields.io/badge/Swift-4.0-orange.svg" alt="Swift 5.0"/>
<img src="https://img.shields.io/badge/platform-iOS-brightgreen.svg" alt="Platform: iOS"/>
<img src="https://img.shields.io/badge/Xcode-9%2B-brightgreen.svg" alt="XCode 9+"/>
<img src="https://img.shields.io/badge/iOS-11%2B-brightgreen.svg" alt="iOS 11"/>
@@ -25,13 +25,38 @@ Advanced usage of native UIAlertController with TextField, TextView, DatePicker,
- [x] Button customization: image and title color.
- [x] Understandable action button placement.
- [x] Easy presentation.
- [x] Pure Swift 4.
- [x] Pure Swift 5.

<div align = "center">
<img src="Assets/gifs/actionSheet-.gif" width="400" />
<img src="Assets/gifs/alert-.gif" width="400" />
</div>


## Installation

### CocoaPods

[CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command:

```bash
$ gem install cocoapods
```

To integrate SwiftTabPager into your Xcode project using CocoaPods, specify it in your `Podfile`:

```ruby
use_frameworks!

pod 'AlertsAndPickers'
```

Then, run the following command:

```bash
$ pod install
```

## Usage

<div align = "center">
@@ -447,31 +472,6 @@ There are some things to keep in mind when using `.actionSheet` and `.alert` sty
* `UITextField` can be used in both styles.


## Installation

### CocoaPods

[CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command:

```bash
$ gem install cocoapods
```

To integrate SwiftTabPager into your Xcode project using CocoaPods, specify it in your `Podfile`:

```ruby
use_frameworks!

pod 'AlertsAndPickers'
```

Then, run the following command:

```bash
$ pod install
```


## Requirements

* Swift 4
18 changes: 14 additions & 4 deletions Source/Pickers/Telegram/TelegramPickerViewController.swift
Original file line number Diff line number Diff line change
@@ -174,7 +174,19 @@ final class TelegramPickerViewController: UIViewController {
}

func layoutSubviews() {
tableView.tableHeaderView?.height = preferredHeight
if let headerView = tableView.tableHeaderView {

let height = preferredHeight
var headerFrame = headerView.frame

//Comparison necessary to avoid infinite loop
if height != headerFrame.size.height {
headerFrame.size.height = height
headerView.frame = headerFrame
tableView.tableHeaderView = headerView
}
}
// tableView.tableHeaderView?.height = preferredHeight
preferredContentSize.height = tableView.contentSize.height
}

@@ -216,9 +228,7 @@ final class TelegramPickerViewController: UIViewController {
UIApplication.shared.open(settingsURL)
}
}
alert.addAction(title: "OK", style: .cancel) { [unowned self] action in
self.alertController?.dismiss(animated: true)
}
alert.addAction(title: "OK", style: .cancel)
alert.show()
@unknown default:
break