A collection view layout manager for variable sized cells
An example of a paged collectionView. Each page is composed of variable sized UICollectionViewCells, creating a beautiful and dynamic layout. See the GitHub project.
Sade Olutola

Product Placement

Kiana Khansmith

Kaledo Art
Claire Keane

❣ Chile in a Photography ❣
No title available
DEAR READER

Andulka
Cosimo Galluzzi

Discoholic 🪩

JBB: An Artblog!
cherry valley forever
ojovivo
I'd rather be in outer space 🛸
we're not kids anymore.
AnasAbdin
Cosmic Funnies
Lint Roller? I Barely Know Her
KIROKAZE
seen from United States
seen from United States

seen from Türkiye
seen from Netherlands

seen from United States
seen from United States
seen from Malaysia
seen from Netherlands

seen from Lithuania
seen from United States
seen from United States

seen from Netherlands
seen from United States
seen from Romania

seen from Malaysia
seen from Netherlands

seen from United States
seen from Germany

seen from Germany
seen from United Kingdom
@subjectivec
A collection view layout manager for variable sized cells
An example of a paged collectionView. Each page is composed of variable sized UICollectionViewCells, creating a beautiful and dynamic layout. See the GitHub project.
Hi I have downloaded Learnist app for iPad. but I was wondering how you have implemented such smooth UICollectionView. specially there is customView in there first and last part of the UICollectionView. how did you do that?
Hello there! Thanks for taking interest in the Learnist app. The UICollectionView in question uses three UICollectionViewCell subclasses. Each custom cell creates a child UIViewController that manages the complex/custom view that is added to the cell’s contentView. This was written several months ago, but if I were to reimplement this, I would now create the child viewControllers in the parent viewController, then add the views to the cells. This way, we more closely adhere to the MVC pattern in which cells are just views, not controllers.
We achieved smooth, interruptable animations using Facebook’s POP framework. The POPSpringAnimation has a velocity property that has a natural decay, creating a realistic animation that is proportional to the gesture. For each cell, we created a state manager that handles the pans, pinches, and taps.
I hope you found this helpful!
Optimized Rendering of Text with CoreText
Given a large body of text, how do you parse it into pages that can fit onto a 1024x768 iPad screen? Or even break it up into beautiful magazine-like columns?
At first, CoreText seemed like an intimidating framework given I was unfamiliar with its C syntax, so I tried the brute force way: iterate over each word until boundingRectWithSize said I couldn't fit any more words for my view's frame. In a collectionView cell, the performance was horrible, as you could imagine, so scrolling was jittery.
Next was to try CoreText. Initially, I followed the Core Text Programming Guide's Columnar Layout example, which uses CTFrameSetterRef to divide the pages. The implementation suggests subclassing UIView and overriding drawRect.
The result was much better. The parsing of the text happened instantaneously. But when profiled for memory allocations via Instruments, the app showed it was holding onto 12 mb of memory for each rendered page. Given an article could have a dozen pages rendered onto the scrollview, memory was quickly building up and soon enough, you'd experience an out-of-memory crash. I had to research more about CoreGraphics performance.
I came across a great article about Rendering Graphics in iOS (GPU vs. CPU), and an even greater follow-up by Apple's (former) UIKit developer, Andy Matuschak!
The most important lesson for me was that drawing a view with the CPU-based framework, CoreGraphics, presents the tradeoff of gaining higher performance for increased memory usage.
The final implementation uses CTFrameSetterRef to quickly divvy up the text into an array of CFRanges (converted into NSRanges), but now I render the the appropriate range of substring into a regular UILabel, only when I need it. The label now consumes 7mb of memory, down from 12mb, for a full screen of text on an iPad.
XCode Shortcuts #1, 2
I will be publishing a series of posts featuring a variety of XCode shortcuts. I think it goes without saying that accumulating a repertoire of these is extremely useful. And you can impress all those old-school programmers that get too lazy to learn new tech :P (At my old job, the oldies weren't too interested in learning the hidden but magical powers of trackpad.. [I should write a post on this one too.]). Since it takes some time to integrate each shortcut into your daily habits, I will reveal only a couple at a time.
You should already know:
Command (⌘) + Control (⌃) + Left/Right/Up/Down Arrow
Up/Down switches between header (.h) and implementation (.m) files. Left/Right jumps back and forth between files that you were previously viewing. Great for when you command(⌘)+click through several definitions and want to go back.
You should probably start using:
Command (⌘) + Control (⌃) + e
Edit all in scope!! Select an instance of a variable, call the hotkeys, start typing, and watch all your variables magically refactor before your eyes.
Stay tuned for more.
- C
Informatics vs. Computer Science
I have a degree in informatics. I'm certain most of you have ever heard of it, but it has given me a different perspective on software development. I wrote this email today to my professors at the University of Califiornia, Irvine describing my experiences as a developer in the Silicon Valley tech bubble through the lens of informatics.
--
Hello Professors,
If you don't remember me, I was a former student in your *favorite* 191/121 class in 2011, the year in which the curriculum changed and two classes of students were combined into one. First of all, I want to thank you and the entire informatics department for being so awesome and making those years of my life memorable and wonderful to look back upon. You guys would be happy to know many of us are successful developers with budding careers. I now live in San Francisco now in the heat of the Silicon Valley tech bubble.
Coming from an informatics background as opposed to the the traditional computer science background has proven interesting and exciting. I can only speak for myself, but I could summarize my experiences:
I have greater HCI knowledge than all of my peers, and that has proven very useful. I would say I know as much UX as the UX designers themselves! (For reference, I specialized in software engineering.) UX is such a brand new field that the designers currently in the industry generally come from a graphics design background, and are only self-taught UX designers. It is important to me to work closely with the designer to come up with the best user experience. It is the difference between a McDonald's hamburger patty and filet mignon.
I have used some UML diagrams. The most common ones I've used were class diagrams, database schema, and user stories. I've seen my peers use swim-lane diagrams and user profiles as well. Though these have proven useful for their purposes, these diagrams encompass <0.1% of my time as a developer. Still, studying how to design for the end-user has helped me strongly develop for the end-user, diagrams or not.
Technical interviews are hard. Really hard. They aim at the traditional CS degrees. I had gone through a few rounds of interviews before I realized exactly what was missing: a solid understanding of algorithms and data structures and how to answer questions for a tech company. Nobody tells you these things, you must teach yourself. After going back and studying these areas, I immediately went from a "needs more experience" candidate to a candidate for serious consideration. I found the following book extremely useful:
http://www.amazon.com/Cracking-Coding-Interview-Programming-Questions/dp/098478280X
Once you get past the technical interview, filling in the rest is a bit easier and job-specific.
I came across this keynote by John Carmack discussing software development as a social science rather than pure engineering. To me, it really reminded me of the core of Informatics which is humanistic. Two years ago I still wasn't very sure of what informatics was, but today I truly understand.
In case you are interested, I'm referring to ~10 min of this video from 30 min to 40 min. https://www.youtube.com/watch?v=wt-iVFxgFWk&feature=player_detailpage#t=1799
Thank you for having been such supportive mentors and reading my long-winded email (it's been helpful for me to express myself in writing!). I hope that my letter can provide some insight to the impact of your teachings in the actual industry and maybe even help guide any future students.
Thank you,
Stacey
Apportable: iOS -> Android
There's no denying that Google's Android platform is winning in terms of market-share. I recently spent some time looking into Apportable, a magical framework that converts native iOS into native Android through some complex API translation and packaging mechanism.
Apportable's first focus was to translate game-related APIs, as it has a thorough coverage of Cocos2D and OpenGL. On the other hand, UIKit is still very much in the works, and for the heavily UIKit-dependent enterprise software I create at my day job, the framework is too young for our needs.
Aside from UIKit, Apportable is amazing, and they update their SDK every day with additional support for UIKit. Without a doubt, they are one to watch out for. If you have a native iOS game now, you best check out what Apportable can offer you.
If you aren't convinced, just check out this Android game that was converted from iOS with Apportable.
- C
A must watch--How design is interpreted by the human mind.
Blocks & Fxnal Programming
Check out BlockKit's implementation of a category on UIAlertView.
UIAlertView *testView = [UIAlertView alertViewWithTitle:@"Very important!" message:@"Do you like chocolate?"]; [testView addButtonWithTitle:@"Yes" handler:^{ NSLog(@"Yay!"); }]; [testView addButtonWithTitle:@"No" handler:^{ NSLog(@"We hate you."); }]; [testView show];
It uses blocks and the concept of functional programming to attach handlers to UIAlertViews. This comes especially in handy when a screen requires multiple alerts. Contrast it with the traditional, long-winded conditional statement checking for each alertView's tag property in a delegate callback. This code is visually and logically associated with the alert initialization.
- C
Pushing the Limits
I've been reading this textbook. Great stuff.
I bought it two years ago, so you'd best wait for iOS7... but from what I can tell, the iOS5 edition was the first edition, and therefore has a lot of tips and tricks that the iOS6 version does not cover. It might be good to read them all if you're feeling ambitious.
- C
NSCelebrities
Following blogs like NSHipster and its heroic author Mattt Thompson further inspires me. He's kinda my iOS hero <3
Me & Mattt at WWDC.
UICollectionView inside a UITableView
If you nest a collection view inside a table view, the table view will eat up the user interaction and does not pass it on. Meaning, the collection view's didSelectItemAtIndexPath will not get called, though the table view's didSelectRowAtIndexPath will.
I remedied this using UITapGestureRecognizer and checking the target of the tap.
This seems to be a bug with the responder chain. If anyone knows different, please let me know. Otherwise, Apple, please fix this ASAP!
- C
The idea is only as good as the execution.
Mobile Security
Points for discussion:
Mobile apps easily track your geolocation within three blocks of accuracy with or without your permission through 3rd party libraries using your IP address and triangulation.
You should really twice before you allow apps to see your contacts, calendars, & notes. LinkedIn had access to meeting notes which included passwords that got hacked. What are you unintentionally sharing?
Many companies do not remember to encrypt your password when transferring data.
My friend could send you a text with a link, and if you click it, your phone will start recording audio without you knowing.
Where my hackers at?
- C