background preloader

iOS

Facebook Twitter

Games

UI. Building a simple AudioPlayer in iOS. iPhone Tutorials. Open run log automatically in Xcode 4  When I switched to Xcode 4, I missed the ability to open a run log window automatically when I run a project.

Open run log automatically in Xcode 4 

Instead, Xcode 4 has a debug area with log output on the bottom of the main window. Because there is lots of log output in our projects and I don’t want to resize the debug area every time, I tried to reproduce the behavior of Xcode 3 (sort of). Ios - How to change the name of an iPhone app. iPad Modal View Controllers - Blog.

There were some minor tweaks to modal view controllers with iPhone OS 3.2 that are worth taking a look at if you need a modal view for an iPad or universal app.

iPad Modal View Controllers - Blog

For changes introduced in iOS 5 and iOS 6 including the deprecation of presentModalViewController:animated: see also this more recent post: Presenting View Controllers Modal View Controller Recap Modal view controllers are well documented in the View Controller Programming Guide for iPhone OS but here is a quick recap of how to present and dismiss a modal view. To keep things simple I will cover the steps for presenting the modal view when a button is pressed on a master view controller. When the button is pressed we need to create and show a detail view controller that contains a button that the user can use to dismiss the modal view controller.

Allocating and showing the detail view controller is straightforward: The target action of the button is the method dismissView in the detail view controller. Web color to UIColor convertor. Introduction to iOS Graphics APIs: Part 1. Download source code - 294 KB Introduction In the first article in this series, I provided a quick introduction to Objective-C, and talked a bit about memory management, working with the controls, and persisting information to files.

Introduction to iOS Graphics APIs: Part 1

In this article, I want to introduce some of the graphics functionality. I will be using the iPad emulator as the target device for this article because of the much better display surface that it provides. But the APIs shown here will work on the iPad, iPhone, and iPod Touch. Prerequisites To take advantage of this article, you will want to have some familiarity with Objective-C and iPhone development.

Available APIs The iPhone supports two graphics API families: Core Graphics/Quartz 2D and OpenGL ES. Representing Colors There are several different ways to represent a color digitally. Show TODO's And FIXME's As Warnings In Xcode 4 - Deallocated Objects by Jake Marsh. Here's a neat little snippet for Xcode 4 that will cause all of your //TODO: and //FIXME: comments in your code to appear as compiler warnings when you build.

Show TODO's And FIXME's As Warnings In Xcode 4 - Deallocated Objects by Jake Marsh

Here's how to use it: Instructions Head over to your project's item in the Project Navigator (usually at the very top)Find your target in the list of targets on the left, select itHead over to the "Build Phases" tab.Click the "Add Build Phase" in the bottom right of this screen.In the editor that appears insert the bash script shown below. Now just build and you'll see all your //TODO: and //FIXME: comments have become warnings. I love this technique, it might not be right for everyone, but hope it helps someone. SBJson. SBJson’s number one feature is chunk-based operation.

SBJson

Feed the parser one or more chunks of UTF8-encoded data and it will call a block you provide with each root-level document or array. Or, optionally, for each top-level entry in each root-level array. See more in the Version 4 API docs. Other features: Configurable recursion limit. Please see the API Documentation for more details. The preferred way to use SBJson is by using CocoaPods. Pod 'SBJson', '~> 4.0.0' Universal Framework iPhone iOS (2.0) Hello my friends, Due to some bugs and questions with the old tutorial, I'm creating this new one, much more simpler and less bugs than the another one.

Universal Framework iPhone iOS (2.0)

I'll not post the old link here because everything you need to know you can find right here. Nowadays, exist few alternatives to create a Framework to iOS, changing the default Xcode Script, which could not be a good choice if you want to publish the APPs constructed with your custom Framework. Cheat Code. iOS SDK 5.1 on Snow Leopard. Using Blocks in iOS 4: Designing with Blocks. In the first part of this series, we learned how to declare and call basic Objective-C blocks.

Using Blocks in iOS 4: Designing with Blocks

The motivation was to understand how to effectively use the new APIs in iOS 4 that take blocks as parameters. In this installment we're going to shift our focus toward writing our own methods that take blocks. By understanding how to use blocks in your own code, you'll have another design technique in your repertoire. And you might just find that blocks make your code easier to read and maintain. Writing Methods That Take Blocks We left off last time with a challenge: Write a Worker class method that takes a block and repeatedly calls it a given number of times, passing in the iteration count each time. [Worker repeat:5 withBlock:^(int number) { return number * 3;}]; I often design classes this way.

So let's get started on the right foot by renaming it: [Worker iterateFromOneTo:5 withBlock:^(int number) { return number * 3;}]; Now, block parameters can be difficult to parse at first sight. ASIHTTPRequest Documentation - All-Seeing Interactive. ASIHTTPRequest is an easy to use wrapper around the CFNetwork API that makes some of the more tedious aspects of communicating with web servers easier.

ASIHTTPRequest Documentation - All-Seeing Interactive

It is written in Objective-C and works in both Mac OS X and iPhone applications. It is suitable performing basic HTTP requests and interacting with REST-based services (GET / POST / PUT / DELETE). The included ASIFormDataRequest subclass makes it easy to submit POST data and files using multipart/form-data. Features ASIHTTPRequest comes with a example applications for Mac and iPhone that demonstrate some of the features. ASIHTTPRequest is partly based on code from Apple’s ImageClient code samples, so if it doesn’t meet your needs, take a look at their CFNetwork examples for more.

ASIHTTPRequest is compatible with Mac OS 10.5 or later, and iOS 3.0 or later. iPhone SDK Examples and Tutorials - About Objects. iOS SDK Examples and Tutorials Download our iOS developer examples.

iPhone SDK Examples and Tutorials - About Objects

Feel free to download any or all of the example code for the Xcode projects shown below to aid your learning. You can even incorporate the code in your own iPhone and iPad apps if you like. The initial set of examples show how to configure the user interface programmatically—in other words, without using Interface Builder.