#uicollectionview
Explore tagged Tumblr posts
Photo
Drag/Drop whole rows and columns in UICollectionView (Grid/Spreadsheet) in iOS swift
0 notes
Text
🧩 Master the Essentials: Design Patterns Every iOS Developer Should Know 📱✨
Design patterns are crucial tools in a developer's toolkit, enabling the creation of robust, scalable, and maintainable code. For iOS developers, understanding and implementing these patterns can dramatically improve app quality and efficiency. Let's explore some of the most important design patterns every iOS developer should know! 🛠️🚀
1. Model-View-Controller (MVC): The Foundation of iOS Development 🏛️
The MVC pattern is fundamental in iOS development, separating the app into three interconnected components:
Model: Manages data and business logic.
View: Handles the display and user interface.
Controller: Acts as an intermediary between the model and the view.
By keeping these components separate, MVC promotes organized and modular code, making it easier to manage and scale.
2. Singleton: One Instance to Rule Them All 👑
The Singleton pattern ensures a class has only one instance and provides a global point of access to it. This is useful for shared resources like network managers or database connections. It helps in managing the state of the application in a controlled and consistent manner.
3. Observer: Keeping Everyone Informed 🔔
The Observer pattern allows objects to be notified of changes in other objects. This is particularly useful for updating the UI in response to data changes. It promotes a clear and decoupled communication mechanism within the app.
4. Delegation: Passing the Baton 🏃♂️🏃♀️
Delegation is a pattern where one object delegates responsibility to another object. This is extensively used in iOS, such as with UITableView and UICollectionView. Delegation promotes loose coupling and clear communication between objects, allowing one object to act on behalf of another.
5. Factory Method: Creating Objects Made Simple 🏭
The Factory Method pattern defines an interface for creating an object but allows subclasses to alter the type of objects that will be created. This pattern is useful for managing and creating objects without specifying the exact class, promoting flexibility and reusability.
6. Facade: Simplifying Complex Systems 🏢
The Facade pattern provides a simplified interface to a complex system, making it easier to use. This is particularly useful when working with large libraries or frameworks, as it hides the complexities and exposes only the necessary functionalities.
7. Strategy: Choosing the Best Path Forward 🛤️
The Strategy pattern defines a family of algorithms and makes them interchangeable. This pattern is useful for selecting algorithms at runtime based on specific criteria. It allows the algorithm to vary independently from the clients that use it.
Key Takeaways: Elevate Your iOS Development Skills 🧠💡
Understanding and implementing these design patterns can significantly improve the quality and maintainability of your iOS applications. Here’s a quick recap:
MVC for structured code organization.
Singleton for managing shared resources.
Observer for efficient communication.
Delegation for clear responsibility delegation.
Factory Method for flexible object creation.
Facade for simplifying complex systems.
Strategy for dynamic algorithm selection.
By mastering these design patterns, you'll be well-equipped to tackle complex iOS development challenges with confidence and ease. Happy coding! 👩💻👨💻
Stay tuned for more insights and tips on iOS app development! If you enjoyed this post, don’t forget to share it and leave a comment below.
0 notes
Text
マッチングアプリで、プロフィールのカードを左右にスワイプするUIは、他に何か応用方法はありますかというご質問ですね。😊
プロフィールのカードを左右にスワイプするUIは、マッチングアプリだけでなく、様々なシーンで応用できるUIの一つです。例えば、以下のような用途が考えられます。
単語帳アプリ:カードに単語や意味を表示し、覚えたかどうかをスワイプで回答する
ニュースアプリ:カードにニュースの見出しや画像を表示し、興味があるかどうかをスワイプで選択する
ショッピングアプリ:カードに商品の写真や価格を表示し、欲しいかどうかをスワイプで判断する
アンケートアプリ:カードに質問や選択肢を表示し、回答するかスキップするかをスワイプで操作する
このように、プロフィールのカードを左右にスワイプするUIは、ユーザーに対して簡単で直感的な操作を提供し、連続した短時間の意思決定を促すことができます。12
もし、このようなUIを実装したいと思ったら、いくつかのライブラリやフレームワークがあります。例えば、FlutterやReact Nativeなどのクロスプラットフォームの開発環境では、Tinder風のスワイプ型カードを実現するためのライブラリが公開されています。345
もちろん、ライブラリを使わずに自分でUIを作成することも可能です。その場合は、UIViewやUICollectionViewなどの基本的なUIコンポーネントと、UIPanGestureRecognizerやUILongPressGestureRecognizerなどのジェスチャー認識の機能を組み合わせて、カードの動きやアニメーションを実装する必要があります。6
いかがでしたか?プロフィールのカードを左右にスワイプするUIは、マッチングアプリ以外にも多くのアプリで活用できるUIだということがお分かりいただけたと思います。😊
もし、このUIに関する質問や疑問がありましたら、お気軽にお聞かせください。😊
0 notes
Video
youtube
Swift4 - Create Responsive GridView using UICollectionView
collection view를 이용한 grid layout 제작
1 note
·
View note
Text
Week 345
Happy Thursday! The main topic of this week seems to have been yesterday’s big tech antitrust hearing in the US House of Representatives, which in our community brought into discussion, again, the App Store, the 30% cut, in-app purchases, various random rejection reasons, randomly enforced App Store review guidelines and special entitlements. While Apple’s official position has always been that they treat everybody the same (and seriously, how could they claim otherwise?), we all know that sometimes that’s just not the case. Unfortunately, I don’t really think this will change soon, but one can hope, right? They did announce at WWDC that developers will be able to challenge the guidelines and that for existing apps, bug fix updates won’t be delayed because of guidelines violations.
In other news, there is some interesting activity in the Swift repo that seems related to async/await. While none of this has gone through Swift evolution, and as far as I know, the only proposal was Chris Lattner’s Swift Concurrency Manifesto to which I linked three years ago, it looks like async/await might be coming to Swift. But don’t get your hopes up for this yet, I’m expecting there will be a lot more time before we get this.
Marius Constantinescu
Articles
Sidebar navigation in SwiftUI, by @mecid
Building a List with UICollectionView in Swift, by @Lee_Kah_Seng
Using LinkPresentation Framework to Present Rich Links in iOS Apps, by @gabtheodor
How to fix the incomprehensible tabs in Xcode 12, by @jesse_squires
Dependency Injection via Property Wrappers, by @kilo_loco
A new way to manage the back button title in iOS 14 with backButtonDisplayMode, by @sarunw
Creating custom .redacted effects, by @zntfdr
Introducing CryptoKit, by @mataharimau
Implementing Grid Layout in SwiftUI, by @ExyteHQ
Setting up a Core Data store for unit tests, by @donnywals
Tools/Controls
100% SwiftUI 2.0, classic 2048 game, by Astemir Eleev
Business/Career
Lessons from Managing for the Summer Part 1, by @micheletitolo
From engineering to product management, and back again, by Will Doenlen
Lessons Learned from Digging into the ASO Strategy of 12 Popular Apps, @appfigures
Podcasts
UI Narrative: Designers Working With Software Engineers | Kaya Thomas, with @kthomas901
Credits
mecid, LeeKahSeng, sarunw, zntfdr, rel, Exyte, donnywals
1 note
·
View note
Text
iOS — Drag and Drop using CollectionView
Do You Know How to Implement Drag and Drop Using CollectionView in iOS?
In this blog post, we will implement Drag and Drop functionality with UICollectionView using swift.
Today, we’ll create a food order book, that shows a list of food items with the list of persons. Users can select food items and drop them off to the person paying for them.
I’ve tried to make this Drag and Drop functionality as easy as possible. At the end of this blog post, we’ll have UI something like this.
We’ll divide implementation into 3 simple steps to make each step easy to understand. Design Views to show food items and users Implement drag delegate Implement drop delegate
For step by step guide, visit canopas blog.
0 notes
Video
youtube
xamarin > Xamarin.iOS Snapping UICollectionView | 2019-01-07T10:38:19.000Z
1 note
·
View note
Video
youtube
Collection View Animations with Gemini (2019)
Power up your app by learning how to add animations and transitions to a UICollectionView element! This is very easy to do with the Gemini Library!
1 note
·
View note
Photo
ios - UICollectionView glitches when removing sections using Compositional Layouts and diffable data sources
0 notes
Link
original source : https://stackoverflow.com/questions/29773787/collectionview-controller-vs-collectionview
UICollectionViewController 와 UICollectionView 의 차이점
UICollectionView inherits from UIScrollView (just another UIView)
UICollectionViewController inherits from UIViewController.. and it implements some protocols.. like UICollectionViewDelegate and UICollectionViewDataSource .. it means everything is already done for you.. and you just have to use it.. but as everything is already done for you.. you may not be able to do some stuff.. like resizing your collectionView ..
if you want full control I recommend you to use your own UIViewController.. and add a UICollectionView as a subview.. so you can place it wherever you want and resize it.. don't forget to implement UICollectionView protocols for delegation and datasource :)
0 notes
Text
Week 304
Happy Thursday! The App Store Connect website, app and API will be under scheduled maintenance on Sunday, October 20, 2019 at 6:00 a.m. PT (3 p.m. CET) for up to 8 hours, so make sure to plan accordingly :)
Marius Constantinescu
Articles
A Repository Full of Our Best Practices in iOS Development, by @goranbrlas
Localization in SwiftUI, by @mecid
SwiftUI Accessibility - Accessible User Interface, by @RobRWAPP
Essential Xcode Shortcuts for More Efficient Coding, by @peterfriese
objc_msgSend’s New Prototype, by @mikeash
Encapsulating configuration code in Swift, by @johnsundell
Optionals in Swift explained: 5 things you should know, by @twannl
Type-safe User Defaults, by @danielctull
Tools/Controls
ASCollectionView - A SwiftUI wrapper for UICollectionView with support for custom layouts, preloading, and more, by @apptekstudios
xcdiff - A tool which helps you diff xcodeproj files, by @marciniwanicki, @kwridan and Adam Khazi
Business/Career
Thriving on the Technical Leadership Path, by @keavy
Apple’s New Subscription Management Prompt Seems to Be Working, by @drbarnard
What To Do When You Get Sherlocked By Apple, by @sjreising
Delivering a “Holiday Special” In-App Purchase by @SasmitoAdibowo
Videos
NSSpain: Detail-oriented UI with Layout Margins, by @hybridcattt
Credits
goranbrl, LisaDziuba, mecid, ApptekStudios, adib.
2 notes
·
View notes
Photo

[100% OFF] Swift 4 – The Complete iOS and WatchOS What you Will learn ? Storyboard, Auto layout with StackView , UICollectionView UITableView, Core Data SQLite swift…
0 notes
Photo

Swift: Youtube - Custom Tab Bar / Menu Bar using UICollectionView (Ep 3) https://www.youtube.com/watch?amp%3Bfeature=youtu.be&v=rRhJGnSmEKQ Welcome back fellow App Builders. We're making solid progress on the YouTube app so lets continue by creating the custom MenuBar that is anchored below our navigation bar. Instead of using a UISegmentedControl like you'd might expect, we're going to create this component using a UICollectionView. Sit back, enjoy, and have some fun learning today. Part 1 - Building the Home Feed: https://youtu.be/3Xv1mJvwXok Part 2 - Assets and Cell Sizing: https://youtu.be/APQVltARKF8 Completed Source Code: https://www.letsbuildthatapp.com/course_video?id=66 Twitter Slide Out Menu Course https://www.letsbui...
0 notes