Media is too big
VIEW IN TELEGRAM
📅 Календарь бронирования. Возьмем за основу календарь из Avito 👨💻
Компонент DatePicker в SwiftUI не позволяет пользователям выбирать диапазон дат. В свою очередь, MultiDatePicker поддерживает эту функцию, но этот контрол доступен только с iOS 16. Создадим свой для iOS 14. Основной дизайн сделаем по образцу календаря в приложении Avito. В нем есть несколько интересных вещей, таких как выбор диапазона дат, недоступные дни или обязательные к бронирования дни.
За кодом сюда
📆Booking calendar. Avito inspired 👨💻
SwiftUI’s DatePicker doesn’t allow users to pick a date range. On the other hand, MultiDatePicker allows this, but it is available only from iOS 16. Let’s create our own for iOS 14. The basic design is inspired by the booking calendar from the Avito app. It contains several interesting features, such as date range selection, unavailable days, or mandatory booking days.
Code is here
#tasty #groovy #trytodo
@swiftui_dev
Компонент DatePicker в SwiftUI не позволяет пользователям выбирать диапазон дат. В свою очередь, MultiDatePicker поддерживает эту функцию, но этот контрол доступен только с iOS 16. Создадим свой для iOS 14. Основной дизайн сделаем по образцу календаря в приложении Avito. В нем есть несколько интересных вещей, таких как выбор диапазона дат, недоступные дни или обязательные к бронирования дни.
За кодом сюда
📆Booking calendar. Avito inspired 👨💻
SwiftUI’s DatePicker doesn’t allow users to pick a date range. On the other hand, MultiDatePicker allows this, but it is available only from iOS 16. Let’s create our own for iOS 14. The basic design is inspired by the booking calendar from the Avito app. It contains several interesting features, such as date range selection, unavailable days, or mandatory booking days.
Code is here
#tasty #groovy #trytodo
@swiftui_dev
Media is too big
VIEW IN TELEGRAM
📱 ↕️ Bottom sheet – это неотъемлемый элемент современных мобильных приложений, который получил широкое распространение благодаря своей универсальности и удобству. Они позволяют эффективно организовать взаимодействие пользователя с интерфейсом, предоставляя доступ к дополнительной информации или действиям, не покидая текущего экрана. Bottom sheet отлично подходят для контекстных меню, форм и быстрых настроек, оставаясь при этом интуитивно понятными благодаря своей привычной для пользователей механике. Их способность адаптироваться к разным сценариям делает их полезными для создания удобных и красивых приложений. Таким образом, это не только модный элемент, а важный инструмент, которая помогает улучшить навигацию, повысить удобство использования приложения для его пользователями.
Но, как это обычно бывает, в SwiftUI bottom sheet появились только в iOS 16, а многие полезные модификаторы для их настройки и вовсе позже - с iOS 16.4. Это создает определенные сложности на проектах, где необходимо поддерживать более ранние версии iOS. В таких случаях, предлагаю вам использовать мой package. Это самостоятельное решение представляет собой реализацию, вдохновленную подходом бэкпорта.
Основная идея состоит в следующем:
• Если на устройстве пользователя установлена iOS версии 16.4 или новее, будет использована нативная реализация bottom sheet.
• Если версия iOS ниже 16.4, то автоматически активируется кастомная реализация.
При необходимости такое поведение можно отключить, оставив исключительно кастомную реализацию.
Краткий мануал здесь.
📋 🔽 Bottom sheets have become a standard in modern mobile apps, thanks to their killer versatility and seamless UX. They let you keep the user on the same screen while offering up extra info or actions on demand. Bottom sheets are well-suited for context menus, forms, and quick settings, remaining intuitive due to the familiar interaction pattern they employ. Their adaptability to different scenarios makes them highly useful for creating aesthetically pleasing and user-friendly applications. Thus, bottom sheets aren’t just a trendy widget – they’re a core tool that boosts navigation flow and levels up overall app usability.
However, as is often the case, SwiftUI introduced native bottom sheets only in iOS 16, and many useful modifiers for their configuration were added even later, starting in iOS 16.4. That’s a headache if your project has to support older iOS versions. Enter my swift package: it’s a custom solution inspired by the whole backport approach.
The core idea is as follows:
• If the user's device is running iOS 16.4 or later, the native bottom sheet implementation will be used.
• If the iOS version is earlier than 16.4, the custom implementation will automatically be activated.
You can disable this behavior if desired, opting to use only the custom implementation.
Quick guide is here.
#swiftpm #tasty #groovy #getsources
@swiftui_dev
Но, как это обычно бывает, в SwiftUI bottom sheet появились только в iOS 16, а многие полезные модификаторы для их настройки и вовсе позже - с iOS 16.4. Это создает определенные сложности на проектах, где необходимо поддерживать более ранние версии iOS. В таких случаях, предлагаю вам использовать мой package. Это самостоятельное решение представляет собой реализацию, вдохновленную подходом бэкпорта.
Основная идея состоит в следующем:
• Если на устройстве пользователя установлена iOS версии 16.4 или новее, будет использована нативная реализация bottom sheet.
• Если версия iOS ниже 16.4, то автоматически активируется кастомная реализация.
При необходимости такое поведение можно отключить, оставив исключительно кастомную реализацию.
Краткий мануал здесь.
📋 🔽 Bottom sheets have become a standard in modern mobile apps, thanks to their killer versatility and seamless UX. They let you keep the user on the same screen while offering up extra info or actions on demand. Bottom sheets are well-suited for context menus, forms, and quick settings, remaining intuitive due to the familiar interaction pattern they employ. Their adaptability to different scenarios makes them highly useful for creating aesthetically pleasing and user-friendly applications. Thus, bottom sheets aren’t just a trendy widget – they’re a core tool that boosts navigation flow and levels up overall app usability.
However, as is often the case, SwiftUI introduced native bottom sheets only in iOS 16, and many useful modifiers for their configuration were added even later, starting in iOS 16.4. That’s a headache if your project has to support older iOS versions. Enter my swift package: it’s a custom solution inspired by the whole backport approach.
The core idea is as follows:
• If the user's device is running iOS 16.4 or later, the native bottom sheet implementation will be used.
• If the iOS version is earlier than 16.4, the custom implementation will automatically be activated.
You can disable this behavior if desired, opting to use only the custom implementation.
Quick guide is here.
#swiftpm #tasty #groovy #getsources
@swiftui_dev