andrewsardone + uikit   77

Reducers - Chris Eidhof
Building up a Redux-like pattern of reducers in Swift and iOS's `UIViewController`.

Swift's enums and structs make this really nice.
swift_lang  redux  swift  UIKit  elm  enum 
10 weeks ago by andrewsardone
Andy Matuschak tweet on React Native
Most exciting thing about React Native to me is the impact on organizations. Reduce siloing, increase collaboration, unify release cycles…

Former UIKit engineer ¯\_(ツ)_/¯
ReactNative  javascript  iOS  react  uikit 
february 2016 by andrewsardone
> A simple React Native View component that resizes composite children views inside itself when the keyboard appears. You can implement your own ScrollView, ListView, Multiple Views etc... inside the View and set your own view to 'flex: 1'.
ReactNative  ios  UIKit  javascript  react  reactjs 
january 2016 by andrewsardone
gistblog - iPad Multitasking Size Classes
A good reference for the various size classes that are rendered in different scenarios of iPad multitasking UIs
reference  UIKit  ios9  autolayout  ios  ipad 
june 2015 by andrewsardone
Vertically stack views using Auto Layout, with an order specific subclass that uses view tags for ordering.

A nice alternative to overloading UITableVew/UICollection view when all you want is simple vertical block layout
ios  github_repo  autolayout  UIView  UIKit  UITableView  UICollectionView 
january 2015 by andrewsardone
UIApplicationDelegate class that separates the different responsibilities into more more reusable classes.
UIApplicationDelegate  ios  uikit  github_repo  srp 
december 2014 by andrewsardone
AutoLayout Myths, Table View Performance, and Side-by-Side iPad App Multi-tasking
A quick read that scratches the surface of how height & size calculations and dynamic content/layout can hurt scrolling performance.
UIKit  ios  performace  UIScrollView  UITableView  UICollectionView  AutoLayout  layout 
may 2014 by andrewsardone
Building Paper presentation
A really interesting series of presentations (followed by a Q&A) with some of the Facebook Paper team. I'm excited that they're open sourcing their Pop framework for animations (originally built by the Push Pop Press team), and it's inspiring to hear about their strategies to engineer delight.
"Introduction" - Scott Goodson (00:00:00)
"First Impressions: Creating Contextually Aware Tutorials" - Madelaine Boyd (00:02:36)
"Clean UI Code: Taming the Combinatorial Explosion" - Jason Prado (00:15:05)
"Spring & Delight: Beyond Static Animations" - Kimon Tsinteris (00:25:20)
"Advanced Gestural Interactions: From Recognizers to Magic" - Brian Amerige (00:37:33)
"Building Asynchronous User Interfaces: Keeping Gestures & Animations Smooth" - Scott Goodson (00:52:12)
"Q&A Panel" - All Speakers (01:08:18)
facebook  design  ios  UIKit  CoreAnimation  animation  presentation 
april 2014 by andrewsardone
RACSignal with Animation · Issue #1248 · ReactiveCocoa/ReactiveCocoa
An example of extracting some simple behavior from [ReactiveCocoaLayout][rcl] that binds a property within an animation block. The idea is that you can use the regular RAC() macro on some animatable UIView property and chain it to a -[RACSignal animateWithDuration:options:] operation:

RAC(view, alpha) = [signalThatEmitsVariousAlphas animateWithDuration:0.3 options:NULL];

It works by -map'ing the next events from the signal ito a +[UIView animateWithDuration:options:animations:completion:] that delegates to a RACSubscriber.

For these animations, it's neat how simple it is to bridge into the reactive world. I’m curious to see how it would have helped me with some [UILabel animation trickiness][uil] I was having.

ReactiveCocoa  reactiveprogramming  uikit  animation  UIView 
april 2014 by andrewsardone
A collection of swipe menu UITableViewCell implementations
Most of these implements use a UIScrollView. This is a good thing; UIScrollView knows how to do this interaction well.

But I wish more libraries simply exposed a UIScrollView that displayed these buttons. The same libraries could also provide default UITableViewCell *and* UICollectionViewCell implementations that use this UIScrollView subclass. But there's no reason an implementation needs to be tied to a particular cell implementation.

Both UITableViewCell and UICollectionViewCell use a `contentView` to hold the cell's contents. I don't think people should liberally add subviews to the `contentView` within a cell implementation. Instead, it'd be better if you designed a plain ‘ol UIView for your cell's contents, and then within an implement added that single view as a `contentView` subview. This means you can waffle back and forth between using a UITableViewCell, a UICollectionViewCell, or who knows what else comes up.
uitableview  uitableviewcell  uicollectionview  uiscrollview  UIKit  iOS 
april 2014 by andrewsardone
An interactive iOS image viewer that does it all: double tap to zoom, flick to dismiss, et cetera.

Tweetbot-style fullscreen image viewing and flicking.
ios  ios7  github_repo  UIImageView  UIViewController  UIKit  UIImage  cocoa 
march 2014 by andrewsardone
Another player in the realm of static resources of various iOS components (images, strings, color plattes, storyboards, etc.)

I'm curious to try this out in comparison robjc:

robjc doesn't do everything objc-codegenutils, mostly just the asset catalog stuff. I *think* that's all I would want (I don't really use story boards or color palettes), and robjc seems “simpler”: it just traverses the filesystem and builds up some Objective-C files. I also like that it namespaces the assets to some degree, putting images in R.images, and strings in R.strings (just like Android).
objective-c  tool  xcode  ios  android  github_repo  UIKit 
march 2014 by andrewsardone
<blcokquote>Easily adjust parameters for iOS apps in development.

Instead of hardcoding a constant to some property, bind it with the FBTweakValue macro to make it tweakable at runtime via an in-app configuration UI.

Lately Facebook has been releasing some top-notch libraries.
ios  facebook  github_repo  UIKit  design 
march 2014 by andrewsardone
The iOS tool for inter-app linking.

A mechanism to bring an Android-like Intents system to iOS. It basically gives you a mechanism to declaratively present an activity sheet to open URLs in other apps that can handle them.
ios  android  intent  UIKit  UIActivity  UIActivityViewController  github_repo 
march 2014 by andrewsardone
FXForms is an Objective-C library for easily creating table-based forms on iOS. It is ideal for settings pages, or user data entry tasks.
github_repo  formobject  form  UITableView  UIKit  ios  cocoa 
march 2014 by andrewsardone
A lightweight zero-config image cache for iOS.

The API and out-of-the-box functionality is the most reasonable I've seen to date for such a common and annoyingly tough problem.
github_repo  UIImageView  UIKit  UIImage  NSCache  cache 
march 2014 by andrewsardone
robjc turns resources in Objective-C projects into compiled constants. from Android-land but with iOS.
ios  android  UIKit  github_repo  objective-c  ruby 
march 2014 by andrewsardone
Clear* Animation Code
Good examples of explanations of clean code applied to animations.

It also included some good reasoning behind the ways of Core Animation. I particularly liked the seciton on `removedOnCompletion` as well as the distinction between the model and presentation layers.
If the animation mysteriously went away, the model value should be the expected end state. The best animation code is written as if the animation was just decoration, if a value should change then a value should change.

An in-depth example was provided in [this StackOverflow][so], but generally I like the sentiment of not relying on animations for the proper state of your UI.

via:iosdevweekly  coreanimation  uiview  uikit  animation  ios 
february 2014 by andrewsardone
Smart, modern table views on iOS.

Yes, god damn it, this is the way it should be:
Use of UIViewControllers in table view cells and runtime generation of cell classes for specific view controllers

This is useful because table cells aren’t usable outside of tables. By hosting content inside a view controller and then hosting that view controller inside a cell you can reuse that UI in other parts of your app very easily. This is often handy.</blockquote
github_repo  uitableview  uitableviewcell  uiviewcontroller  UIKit  ios  autolayout 
december 2013 by andrewsardone
An iOS manager for presenting system-wide notifications via a dropdown message bar.
github_repo  ios  UIKit  ui  alert  notification 
december 2013 by andrewsardone
UITextView iOS 7 new line scroll fix
Works around the issue where UITextView doesn't scroll to the new line until there's a character in there. Super horrible workaround.

I believe Brent Simmons posted some related hacks, too. it's disappointing that there's such a buggy component for such basic UI in iOS 7.
uikit  uitextview  ios  ios7 
november 2013 by andrewsardone
UICollectionViewLayout subclass for displaying items of different sizes in a grid without wasting any visual space.
uicollectionview  design  github_repo  uikit  ui 
november 2013 by andrewsardone
A nice set of objects that help with animating views in response to events
ios  github_repo  animation  uikit  coreanimation 
october 2013 by andrewsardone
Set iOS 7 background style on UIApplication
Non-opaque application windows in iOS 7, with optional blur. Shows the user's wallpaper under the app, with Parallax if supported.

Pretty neat, I just wish it wasn't a [private API][pa]

uikit  ios  ios7 
september 2013 by andrewsardone
WYPopoverController is for the presentation of content in popover on iPhone / iPad devices. Very customizable.
github_repo  via:github  uikit  ios  uipopovercontroller 
august 2013 by andrewsardone
Grouped Table Views with Multiple Columns |
Grouped UITableView-like object but implemented with a UICollectionView and with multiple column support.
uitableview  uicollectionview  ios  uikit 
july 2013 by andrewsardone
BitSuites/BPBarButtonItem · GitHub
A tool for making awesome looking custom UIBarButtonItems on the fly.
uikit  ios  cocoa  uibarbuttonitem  design  via:github  github_repo 
may 2013 by andrewsardone
UICOLOR_FROM_HEX – When your designers give you hex codes for colors, use this macro
A simple little macro that shifts the components of a hex color value into the rgb values that -[UIColor colorWithRed:green:blue:alpha:] expects.
ios  uikit  uicolor  cocoa  macro 
may 2013 by andrewsardone
toursprung/TSMessages · GitHub
«Easy to use and customizable messages/notifications for iOS à la Tweetbot»
cocoa  ios  uikit  notifications  uialertview  via:github  github_repo 
april 2013 by andrewsardone
Designing for iOS: Blending modes
A tutorial on building a UIImage category that adds two instance methods that return a tinted copy of the receiver. The tutorial helps clarify some tricky blending modes and alpha channel trickery.
coregraphics  ios  uikit  uiimage 
april 2013 by andrewsardone
robertwijas/UISS · GitHub
UIAppearance Stylesheets

JSON stylesheets for configuring UIViews' style via UIAppearance proxies.
ios  uikit  css  design  uiappearance  stylesheet 
march 2013 by andrewsardone
Secure Mac Programming : Coupling in a Cocoa[ Touch] App
A stream of consciousness blog post on the tightly-coupled-state of Cocoa development. Jokes abound that reiterate a hard-to-recognize problem within the community:
iOS architecture, where MVC stands for Massive View Controller

I'm preparing for a talk on this very subject (working title: «Fixing your MVC (Mostly View Controller) code with some MVC») – my response to this article was a slow clap.
oop  ios  mvc  srp  uikit  from instapaper
march 2013 by andrewsardone
IdeasOnCanvas/Ashton · GitHub
Converts NSAttributedStrings between AppKit, CoreText, UIKit and HTML.
ios  markup  nsattributedstring  nsstring  uikit  via:github  github_repo 
march 2013 by andrewsardone
romaonthego/REFormattedNumberField · GitHub
A UITextField subclass that formats strings based on a priced format (e.g., +X (XXX) XXX-XXXX)
ios  objective-c  uitextfield  uikit  via:github  github_repo 
march 2013 by andrewsardone
TeehanLax/TLTiltHighlightView · GitHub
A horizontal gradient which adjusts its appearance based on the positional attitude of an iOS device

I love this effect in the iPhone's, now I just need to review the code and find a place where I can use it ;-)
uikit  ios  via:github  github_repo 
march 2013 by andrewsardone
UITableView and NSFetchedResultsController: Updates Done Right | Core Fruition
Seemingly a much nicer implementation of reacting to NSFetchedResultsControllerDelegate events with UITableView updates.
cocoa  uikit  uitableview  nsfetchedresultscontroller  coredata  iOS 
february 2013 by andrewsardone
square/objc-TimesSquare · GitHub
TimesSquare is an Objective-C calendar view
A UITableView-based calendar UI.

Introductory blog post:
ios  uikit  ui  cocoa  via:github  github_repo 
february 2013 by andrewsardone
Caching Drawing Code - kgn
A simple category on UIImage[1] that caches the results of custom drawing a bitmap graphics context into a cache so the worked isn't duplicated on every -[UIView drawRect:]

ios  uikit  coregraphics  performance 
february 2013 by andrewsardone
Customizing UITableViewCells: a better way. – Giorgio's Blog
A strategy for implementing custom UITableViewCells that have superb scrolling performance. It uses the common and well-known pattern of filling the cell's contentView with an opaque custom drawn few, limiting the depth of subviews and number of transparent backgrounds (limiting compositing and other performance degrading issues), but it goes one step further by handling on cell selecting/highlighting behavior within the custom contentView subview. This mitigates awkward deselect animations (text shadows, background colors, etc) with the trade-off being more cumbersome code (the deselection animation is handled by animating between two screenshots, i.e., bitmaps of the layers, of the different cell states) and these inner custom views having knowledge of the specific UITableViewCell (it's passed into the view's initializer).
uitableview  uitableviewcell  ios  uikit  performance 
february 2013 by andrewsardone
pkluz/PKRevealController · GitHub
The evolution of ZUUIRevealController, my previously favorite slide-out navigation/underbar/reveal controller implementation. The code looks solid, but as of 2013-01-24 I haven't used it in a project.
ios  cocoa  uikit  reveal-controller 
january 2013 by andrewsardone

GIKPopoverBackgroundView is a UIPopoverBackgroundView subclass which shows how to customise the background of a UIPopoverController.
ios  cocoa  uipopovercontroller  ipad  uikit  via:github  github_repo 
january 2013 by andrewsardone
chrisdevereux/Slash · GitHub
«Slash is a simple, extensible markup language for styling NSAttributedStrings. The language is similar in appearance to HTML, however the meaning of each tag is user-defined.»

This builds off of NSAttributedString and the additional APIs added in iOS 6, but it simplifies their creation by adding markup instead of dealing with a bunch of NSRanges.

I'll also note that Java has an NSAttributedString-like object, [java.text.AttributedString][jtas], so the Android SDK has a similar API. But on Android, there's already a more convenient string formatting API based-on HTML-markup:

- [String Resources | Android Developers][adsr]
- [android.text.Html.fromHtml(String)][atfromHtml] is a Slash-like API, though styling is a little less straightforward.

ios  uikit  nsstring  nsattributedstring  markup  via:github  github_repo 
december 2012 by andrewsardone
Deep-dive into CALayer Shadows | d3signerd | Kellen Styler
Contains two good tips on optimizing CALayer shadows for better performance:

## Set your CALayer's `shadowPath` property path

This tells your view to use a path to draw its shadow instead of using its layer’s composited alpha channel.

view.layer.shadowPath = [UIBezierPath bezierPathWithRect:view.bounds].CGPath;

## Set your CALayer's `shouldRasterize` property to YES

This will tell the view to render it’s `CALayer` as a bitmap and provide better rendering performance.

view.layer.shouldRasterize = YES;
uikit  coreanimation  iOS 
december 2012 by andrewsardone
opyh/motion-state-machine · GitHub
A state machine gem designed for RubyMotion for iOS.

It features:

- A simple, nice-looking definition syntax
- Reaction to sent events, defined timeouts and global NSNotifications
- Transition guards and actions
- State entry / exit actions
- Internal transitions that don't leave the machine's current state
- Optional verbose log output for easy debugging
- Grand Central Dispatch-awareness — uses GCD queues for synchronization
rubymotion  ui  uikit  gcd 
december 2012 by andrewsardone
Formotion – RubyMotion
Declaratively construct UITableView-based forms/UI with a Hash or DSL. This really takes away the pain of writing boilerplate table view code by allowing you to define the structure of your UI and bind its values to model values.
rubymotion  uikit  uitableview  dsl  kvo  bindings 
december 2012 by andrewsardone
rubymotion/teacup · GitHub
“A community-driven DSL for creating user interfaces on the iphone.

Using teacup, you can easily create and style layouts while keeping your code dry. The goal is to offer a rubyesque (well, actually a rubymotion-esque) way to create interfaces programmatically.”
rubymotion  ruby  ui  uikit  dsl 
december 2012 by andrewsardone
A small library for semantic layout of UIViews. It mixes into all UIViews a frame builder object that can manage and manipulate a view's frame.
uikit  ios  layout  cocoa 
december 2012 by andrewsardone
UIView Frame helper getter/setter category methods — Gist
Convenient setters and getters for a UIView's frame properties.


someView.$x = otherView.$right
uikit  ios  layout  cocoa 
december 2012 by andrewsardone
mindsnacks/MSCachedAsyncViewDrawing · GitHub
Helper class that allows you to draw views (a)synchronously to a UIImage with caching for great performance.

It provides a message implemented for associating wit a cache key a drawing routine that renders a UIImage with a given size and background color:

-[MSCachedAsyncViewDrawing drawViewAsyncWithCacheKey:size:backgroundColor:drawBlock:completionBlock:]

And the last two arguments are of the block types below:

typedef void (^MSCachedAsyncViewDrawingDrawBlock)(CGRect frame);
typedef void (^MSCachedAsyncViewDrawingCompletionBlock)(UIImage *drawnImage);
cocoa  uikit  gcd  uiimage 
november 2012 by andrewsardone
UIActivity Providers for iOS6
A directory of all the community-based iOS 6 UIActivity providers in one place.
ios  uiactivity  uikit  ipc  services 
november 2012 by andrewsardone
Cocoa noise drawing code + a ready to go noise view. Luckily there's also a CocoaPods spec for this.
ios  objective-c  uikit 
september 2012 by andrewsardone
Swizzled UIImage imageNamed for iPhone 5 — Gist
UIImage extensions that loads a PNG resource with the "-568h" suffix for -[UIImage imageNamed:] on the iPhone 5.
ios  uikit  objective-c  iphone5 
september 2012 by andrewsardone

related tags

alert  android  animation  autolayout  bezier  bindings  blur  cache  cocoa  cocoapod  cocoa_controls  coreanimation  coredata  coregraphics  css  design  dsl  elm  enum  facebook  form  formobject  functional  functionalprogramming  gcd  github_repo  ifttt  intent  interfacebuilder  ios  ios7  ios9  ipad  ipc  iphone5  javascript  javascriptcore  json  kvo  layout  macro  markup  material_design  multitasking  mvc  notification  notifications  nsattributedstring  NSCache  nsfetchedresultscontroller  nsstring  objective-c  oop  performace  performance  presentation  react  ReactiveCocoa  reactiveprogramming  reactjs  ReactNative  redux  reference  reveal-controller  ruby  rubymotion  services  signature  srp  stylesheet  swift  swift_lang  tool  tutorial  ui  uiactivity  UIActivityViewController  uialertview  uiappearance  UIApplicationDelegate  uibarbuttonitem  uibezierpath  uibutton  uicollectionview  uicolor  UIDynamics  uiimage  UIImageView  uikit  UINavigationController  uipopovercontroller  uiscrollview  uisplitviewcontroller  UIStackView  uitableview  uitableviewcell  uitextfield  uitextview  uiview  uiviewcontroller  via:cdzombak  via:daveverwer  via:github  via:iosdevweekly  via:joshaber  wwdc2015  xcode 

Copy this bookmark: