
The Most Useful Objective-C Code I’ve Ever Written « Vincent Gable’s Blog Actually, it’s the most useful code I’ve extended; credit for the core idea goes to Dave Dribin with his Handy NSString Conversion Macro. LOG_EXPR(x) is a macro that prints out x, no matter what type x is, without having to worry about format-strings (and related crashes from eg. printing a C-string the same way as an NSString). It works on Mac OS X and iOS. Here are some examples, LOG_EXPR(self.window.screen); self.window.screen = <UIScreen: 0x6d20780; bounds = {{0, 0}, {320, 480}}; mode = <UIScreenMode: 0x6d20c50; size = 320.000000 x 480.000000>> LOG_EXPR(self.tabBarController.viewControllers); self.tabBarController.viewControllers = ( “<UINavigationController: 0xcd02e00>”, “<SavingsViewController: 0xcd05c40>”, “<SettingsViewController: 0xcd05e90>” ) Pretty straightforward, really. LOG_EXPR(self.window.windowLevel); self.window.windowLevel = 0.000000 LOG_EXPR(self.window.frame.size); self.window.frame.size = {320, 480} Give it a try. How It Works The Macro, Line By Line Limitations Arrays __func__
Buy Source Code for iphone, android, ipad apps. Transfer App Ownership. GRID: Interactive multi-touch sound visualization by @futuraepsis1 made in #Processing - controlled via iPhone/iPad #oF GRID is an interactive multi-touch sound visualization for the band Mathon and the ZKM AppArtAward 2011. Created for live events, the application consists of a desktop version for realtime graphic visualization of music – created using Processing and also an iOS version for interacting with the Processing app – created using openFrameworks. The basic appearance is based on a shape that deforms synced to an audio signal. A never ending journey through portal-like visuals, organic and technical scenes take the viewer into a surreal feeling atmosphere. Using an iPad or an iOS capable device people can diretly interact with the music visualization. The artwork is the result of a cooperation between the interactive arts collective Futura Epsis 1 based in Hamburg, Germany represented by Andreas Rothaug and the band Mathon from Switzerland who are responsible for the sound. The downloads are available for: iPhone / iPad (out next week), Mac OS 10.6, Windows and Linux.
call apps from url Many app-related tasks depend on the type of app you are trying to create. This chapter shows you how to implement some of the common behaviors found in iOS apps. Configuring Your App to Support iPhone 5 Apps linked against iOS 6 and later should be prepared to support the larger screen size of iPhone 5 and iPod touch (5th generation) devices. To let the system know that your app supports the iPhone 5 screen size, include a properly named launch image in your app’s bundle. For more information about specifying the launch images for your app, see “App Launch (Default) Images.” Creating a Universal App A universal app is a single app that is optimized for iPhone, iPod touch, and iPad devices. Xcode provides built-in support for configuring universal apps. The following sections highlight the changes you must make to an existing app to ensure that it runs smoothly on any type of device. Updating Your Info.plist Settings key_root-<platform>~<device> Implementing Your View Controllers and Views
10 iPad Apps for Web Developers | MobiGeni - Mobile Software Development Services Today I want to share 10 iPad apps that are particularly geared towards web developers. Because, with a product as aesthetically pleasing as the iPad, you just know it’s something that developers will be naturally drawn to- especially with apps like these to help us do better work. Gusto Gusto was created to embrace the workflow of web development on the iPad. Quickly identify your project with a beautifully generated thumbnail of your website. Open your project and download multiple files and folders at a time from your FTP server. FTP On the Go Pro An FTP client for the iPhone and iPod touch. With FTP On The Go, you can fix your website, and view files on your FTP server, from anywhere. Code Monkey Source Editor FTP What makes Pocket Monkey special is the custom renderer specifically built to keep text file whitespace formatting intact. HTML Edit EditPad for iPad EditPad is an iPad HTML editor to go. jQuery Reference The jQuery Reference escorts you whereever you go. Markup Source viewer XL
Parsing URL The scheme name (or protocol) of a URL is the first part of a URL - e.g. For web pages, the scheme is usually http (or https). The iPhone supports these URL schemes: * Web links that point to are redirected to the Maps app. * Web links that point to are redirected to the YouTube app. * iTunes store links ( are sent to the iTunes (or App store) app. iPhone apps can also specify their own custom URL scheme (for example, To transfer data from lite to paid versions of your app To allow other apps (or even web pages) to call your app (and send data to it) To handle callbacks for custom authentication (such as OAuth) and third party API's Implementing a Custom URL Scheme Defining your app's custom URL scheme is all done in the Info.plist file. After you've set the URL identifier, select that line and click the "+" sign again, and add a new item for URL Schemes. Handling Custom URL Calls
Buy App | AppFax Publish your own flashcards apps in the AppStore for a fraction of cost iPhone programmers typically charge $80-120 per hour!! That’s insane. We offer you a completely functional, feature-rich flashcards app for only $99! Hi folks, have you ever wanted to publish your own apps in the AppStore? Did the sky-high development costs keep you from doing so? Consider this, a ready made iPhone flashcards app that has been developed using the highest quality code. Details You will receive a completely functional flashcards app (xcode script).This app features native support for both the iPhone and iPod devices.This is a one-time purchase of only $99.No recurring billing.As with all iPhone apps, it is written in xcode and you need to have an Apple developer account or have access to a developer to add your content, customize and publish your work on the App Store. Instant download
Showing a "Loading..." message over the iPhone keyboard Introduction "Loading..." messages When waiting for data loaded from the internet, many iPhone applications use a mostly black, semi-transparent view to block the display. Most use a basic "spinner" (UIActivityIndicatorView) to reassure the user that the application is still running, frequently accompanied by "Loading..." text. Despite the prevalence of this type of loading message, it is not a standard control and must be constructed manually. Finding the keyboard Apple give no methods to locate the keyboard or even the current first responder in an iPhone application. The sample application The sample LoadingView application in this post can display the following two types of loading window: A full-window loading message and a keyboard-only loading message. The sample application doesn't actually load anything. Displaying a loading view The behaviors in my loading view include: All that's required to make it look semi-transparent is a custom drawing method. Round Rects are Everywhere! Conclusion
PrEV | UITableViewCell from a NIB file Feb 12, 2009 by Bill Dudney I have had several questions recently on how to use Interface Builder to create table view cells. And more specifically how to add stuff like controls to the table view cells and have them invoke methods on a controller object that can mediate the connection to the model. The Settings application's 'Sounds' configuration section has an example of what I'm heading towards. Here is a screen shot of my exceedingly ugly and non HIG conformant application that I build to illustrate the idea. The Model that underlies this application is just a string holder, very simple. If you'd like to follow along you can get the code here or you can build it yourself starting from the 'Navigation Based Application' template. Let's start with the model, remember that the model is the underlying logic of your application captured in classes. Not a lot here, and the implementation file is equally simple; In the viewDidLoad I initialize this list of model objects. Apple-tab-span
NSPredicate predicateWithBlock & bindings - wannabegeek Since Mac 10.6 and iOS 4.0 NSPredicate has supported a method predicateWithBlock. I looks to be a pretty commonly used method, but I could find no examples and only limited documentation on the bindings dictionary argument to the block method. + (NSPredicate *)predicateWithBlock:(BOOL (^)(id evaluatedObject, NSDictionary *bindings))block If you wanted to just to a slightly more complex search than predicateWithFormat can provide. NSArray *array = ............; BOOL expectedValue = YES; result = [array filteredArrayUsingPredicate:[NSPredicate predicateWithBlock:^BOOL(id evaluatedObject, NSDictionary * bindings) { return (evaluatedObject.enabled == expectedValue); }]; Since this predicate is created and evaluated immediately the block also has access to local variables (e.g. expectedValue). Now if we wanted to create a template predicate we can do this with a block so we can evaluate against an object later. What about NSArray’s filteredArrayUsingPredicate:
Resize a UIImage the right way — Trevor’s Bike Shed When deadlines loom, even skilled and experienced programmers can get a little sloppy. The pressure to ship may cause them to cut corners and look for a quick and easy solution, even if that solution is sure to cause trouble later on. Eventually, their coding style devolves into copy and paste programming, a lamentable tactic that involves cherry-picking snippets of code from a past project and putting them to use in the current one. Of course, the proper solution is to factor out the code into some kind of reusable library, but due to time constraints, it’s simply duplicated wherever it’s needed. Any bugs in the original code have now spread to a dozen different places in a dozen different projects. Yet in the world of iPhone applications, copy and paste programming seems to be disturbingly common. This situation has transformed more than a few iPhone programmers into copy and paste programmers. Now imagine what happens when a thousand iPhone developers find the same snippet. License
Changing the text color of a grouped UITableView’s section header « Blog The concept was pretty simple. To change the textColor of the section headerView of a tableView, you just implement the following optional delegate method in your table view’s delegate: - (UIView *) tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section In that method, all you have to do is create a UIView with a UILabel and the text you want. However, recreating the look and feel of the default grouped UITableView took a lot of tweaking. ipad development, iphone development, objective c This entry was posted on September 8, 2010, 11:58 am and is filed under Development.
On SSL Pinning for Cocoa [Touch] — Secure Mac Programming Moxie Marlinspike, recently-acquired security boffin at Twitter, blogged about SSL pinning. The summary is that relying on the CA trust model to validate SSL certificates introduces some risk into using an app – there are hundreds of trusted roots in an operating system like iOS, and you don’t necessarily want to trust all (or even any) of the keyholders. Where you’re connecting to a specific server under your control, you don’t need anyone else to tell you the server’s identity: you know what server you need to use, you should just look for its certificate. Then it doesn’t matter if someone compromises any CA; you’re not trusting the CAs any more. He calls this SSL pinning, and it’s something I’ve recommended to Fuzzy Aliens clients over the past year. The first thing you need to do is to tell Foundation not to evaluate the server certificate itself, but to pass the certificate to you for checking. That’s really all there is to it.