background preloader

Cocoa

Facebook Twitter

Reordering a UITableViewCell from any touch point. (Now updated for iOS 7 and ARC) A component of one of our upcoming apps is a Scramble type game where letters are rearranged to solve the word.

Reordering a UITableViewCell from any touch point

Writing high-quality view controller containers. In a previous article, I mentioned high-quality view controller containers as an essential tool to help you manage your view controller hierarchy efficiently.

Writing high-quality view controller containers

Writing such objects is difficult to get right, though, since many issues have to be faced simultaneously. In this article, we will define which requirements view controller containers should fulfill and, of course, how they can be implemented. This should not only provide you with hints about containers themselves, but also about view controllers in general. To my great surprise, though view controllers are part of the everyday life of an iOS programmer, I discovered they are often misused and abused, probably due to a lack of understanding. Programmers often have a way to quickly judge the quality of some code base, mine for iOS projects is to look at how its view controllers are implemented.

UTS #35: Locale Data Markup Language. Unicode Technical Standard #35 Summary This document describes an XML format (vocabulary) for the exchange of structured locale data.

UTS #35: Locale Data Markup Language

This format is used in the Common Locale Data Repository maintained by the Unicode Consortium. Status This document has been reviewed by Unicode members and other interested parties, and has been approved for publication by the Unicode Consortium. A Unicode Technical Standard (UTS) is an independent specification. Please submit corrigenda and other comments with the online reporting form [Feedback]. Contents 1. Not long ago, computer systems were like separate worlds, isolated from one another. Technical Q&A QA1688: Why won't my UIViewController rotate with the device? App Store-safe Page Curl animations at Ole Begemann: iOS Development. Simon Says : How to really URL encode an NSString in Objective-C. Easy custom UITableView drawing.

Make my table pretty The core of most iPhone applications is the UITableView.

Easy custom UITableView drawing

To make your iPhone application stand out, the simplest way is to make your UITableView look good. Customizing your UITableView can be really easy. You don't need custom drawing code. You don't need subclasses of anything. The sample application. Drill down table view with a detail view - iPhone SDK Articles. Stop UIWebView from "bouncing" vertically. In App Purchase Programming Guide: Overview of In App Purchase. João Prado Maia’s Weblog » Customizing the background/border col. Customizing the background color of a UITableView is somewhat easy, but only if you use the plain style.

João Prado Maia’s Weblog » Customizing the background/border col

If you use the grouped style of a table view, it starts to get way more complex. There are no easy ways to quickly set a property for the border color and the background color of the whole table view cell. Well, there are, but if you try to change some of these values and try to use the grouped style, it will look completely wrong.

Below you have a proper grouped table view using the standard Apple theme: Looks pretty good, and it is also very simple to build that in objective-c. So now let’s try something tricky and simply change the backgroundColor property of cell.contentView, as that works fine when dealing with “plain” style table views. Distinguish iPhone 3G from iPhone 3GS. UITableView and keyboard scrolling problem. Gallery of Processor Cache Effects. Most of my readers will understand that cache is a fast but small type of memory that stores recently accessed memory locations.

Gallery of Processor Cache Effects

This description is reasonably accurate, but the “boring” details of how processor caches work can help a lot when trying to understand program performance. In this blog post, I will use code samples to illustrate various aspects of how caches work, and what is the impact on the performance of real-world programs. The examples are in C#, but the language choice has little impact on the performance scores and the conclusions they lead to. Example 1: Memory accesses and performance How much faster do you expect Loop 2 to run, compared Loop 1? Int[] arr = new int[64 * 1024 * 1024]; // Loop 1for (int i = 0; i < arr.Length; i++) arr[i] *= 3; // Loop 2for (int i = 0; i < arr.Length; i += 16) arr[i] *= 3;

What's new in iPhone OS 4 (iOS 4) Multitasking Applications built using iPhone SDK 4.0 or later (and running in iPhone OS 4.0 and later) are no longer terminated when the user presses the Home button; instead, they now shift to a background execution context.

What's new in iPhone OS 4 (iOS 4)

For many applications, this means that the application enters a suspended state of execution shortly after entering the background. Keeping the application in memory avoids the subsequent launch cycle and allows an application to simply reactivate itself, which improves the overall user experience. And suspending the application improves overall system performance by minimizing power usage and giving more execution time to the foreground application. Although most applications are suspended shortly after moving to the background, applications that need to continue working in the background may do so using one of the following techniques: Integration Technologies The following sections describe the technologies you can use to enhance your application’s user experience.