TimeZonePicker
A TimeZonePicker UIViewController similar to the iOS Settings app. Search and select from a range of cities and countries to find your most suitable time zone.
Install / Use
/learn @gligorkot/TimeZonePickerREADME
TimeZonePicker
<a href='https://ko-fi.com/gligor' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://az743702.vo.msecnd.net/cdn/kofi1.png?v=0' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
A TimeZonePicker UIViewController similar to the iOS Settings app. Search and select from a range of cities and countries to find your most suitable time zone.
Screenshots

Installation
CocoaPods
To install it in your iOS project, install with CocoaPods
pod 'TimeZonePicker'
Usage
Basic Initialisation
To initialise a timeZonePicker you can use the class function getVC(withDelegate: TimeZonePickerDelegate) on the TimeZonePickerViewController as below:
let timeZonePicker = TimeZonePickerViewController.getVC(withDelegate: self)
Then you can use the timeZonePicker as you would any UIViewController, for example:
present(timeZonePicker, animated: true, completion: nil)
TimeZonePickerDelegate
The TimeZonePickerDelegate currently has only one method that needs to be implemented:
func timeZonePicker(_ timeZonePicker: TimeZonePickerViewController, didSelectTimeZone timeZone: TimeZone)
Once an item is selected from the table of cities/countries the above delegate method gets called, conveniently returning the TimeZonePickerViewController and the selected TimeZone. You can use the timeZonePicker to dismiss it here and the timeZone as you need it in your application. For example:
func timeZonePicker(_ timeZonePicker: TimeZonePickerViewController, didSelectTimeZone timeZone: TimeZone) {
timeZoneName.text = timeZone.identifier
timeZoneOffset.text = timeZone.abbreviation()
timeZonePicker.dismiss(animated: true, completion: nil)
}
Please check the TimeZonePickerExample project for the above usage example. If you have any questions do not hesitate to get in touch with me.
Requirements
- iOS 8 or later.
- Swift 3
License
Copyright (c) 2017 Gligor Kotushevski
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Related Skills
node-connect
342.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
85.3kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
342.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
342.5kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
