A UICollectionViewLayout subclass for displaying focused content with a featured cell that expands.
SFFocusViewLayout is a custom UICollectionViewLayout subclass for iOS that creates dynamic interfaces with a focused content cell. It solves the problem of building visually engaging collections where one item is highlighted as users scroll, similar to Apple TV or featured content interfaces. The layout automatically manages cell sizing and transitions between standard and focused states.
iOS developers building apps that require visually dynamic collection views, such as media browsers, featured content displays, or apps needing Apple TV-style interfaces. It's particularly useful for those implementing focus-driven navigation patterns.
Developers choose SFFocusViewLayout because it provides a ready-to-use, customizable solution for focus-based UICollectionView layouts without needing to implement complex custom layout logic from scratch. Its simplicity and visual polish make it ideal for creating professional-looking interfaces quickly.
UICollectionViewLayout with focused content
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Allows setting standardHeight and focusedHeight to control cell sizes, with defaults of 100pt and 280pt, enabling precise visual hierarchy without complex code.
Provides automatic, fluid expansion and collapse of cells during scrolling, creating an engaging user experience similar to Apple TV interfaces as shown in the GIF.
Offers separate implementations for Swift and Objective-C, with versioned pods (3.0+ for Swift, 2.0+ for Objective-C) ensuring compatibility across iOS codebases.
Supports multiple package managers including CocoaPods, Carthage, and Swift Package Manager, simplifying installation with clear instructions in the README.
Only exposes three properties (standardHeight, focusedHeight, dragOffset), lacking support for horizontal scrolling, spacing adjustments, or advanced animation controls.
README is brief with no example projects or tutorials, forcing developers to infer implementation details from basic property descriptions alone.
Last updated for Swift 4.2 based on badges, with no recent commits or mention of newer Swift versions, risking compatibility issues in modern iOS development.