Posts

Showing posts from June, 2011

UISegmentedController Customized

http://idevrecipes.com/2010/12/13/wooduinavigation/

Custom UITabBar

Technique 1: http://blog.theanalogguy.be/2010/10/06/custom-colored-uitabbar-icons/ Technique 2: @implementation UITabBar ( CustomImage ) - ( void ) drawRect :( CGRect ) rect {     UIImage * image = [ UIImage imageNamed : @ "background.png" ];     [ image drawInRect : CGRectMake ( 0 , 0 , self . frame . size . width , self . frame . size . height )]; } @end http://stackoverflow.com/questions/675433/custom-colors-in-uitabbar Technique 3 http://idevrecipes.com/2011/01/04/how-does-the-twitter-iphone-app-implement-a-custom-tab-bar/ Technique 4: (Tried and tested) https://github.com/rumex/RXCustomTabBar

UIScrollView

Add UIScrollView Programmatically http://www.icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray/ Ass UIScrollView Using IB http://www.youtube.com/watch?v=aXY12W_QQq4

NSNotificationCenter

http://blog.isotoma.com/2009/11/on-objective-c-delegates-and-nsnotification-objects/ http://stackoverflow.com/questions/1382241/multiple-delegates-in-objective-c

Segmented View Controller for Switching Views

http://redartisan.com/2010/6/27/uisegmented-control-view-switching-revisited https://github.com/crafterm/SegmentedControlRevisited

core data wrapper

https://github.com/magicalpanda/MagicalRecord

Core Data Epic Introduction

http://cocoadevcentral.com/articles/000086.php Fetch data using one line: [[self managedObjectContext] fetchObjectsForEntityName:@"Employee" withPredicate:     @"(lastName LIKE[c] 'Worsley') AND (salary > %@)", minimumSalary]; Via:  http://cocoawithlove.com/2008/03/core-data-one-line-fetch.html one to many relationship http://lethain.com/one-to-many-relationships-in-coredata/

OAuth with tweepy

VIA:  https://github.com/tweepy/tweepy/blob/4799c740a20882e854a636e2721164cd5841a6c8/doc/auth_tutorial.rst OAuth Authentication OAuth is a bit trickier than basic auth, but there are some advantages to using it: You can set a 'from myappname' which will appear in tweets posted More secure since you don't need the user's password Your app does not break if the user changes their password in the future Tweepy tries to make OAuth as painless as possible for you. To begin the process we need to register our client application with Twitter. Create a new application and once you are done you should have your consumer token and secret. Keep these two handy, you'll need them. The next step is creating an OAuthHandler instance. Into this we pass our consumer token and secret which was given to us in the previous paragraph: auth = tweepy.OAuthHandler(consumer_token, consumer_secret) If you have a web application and are using a callback URL that needs to be supplied dy

Tutorial: consuming Twitter's real-time stream API in Python

VIA:  http://arstechnica.com/open-source/guides/2010/04/tutorial-use-twitters-new-real-time-stream-api-in-python.ars/ import pycurl, json STREAM_URL = "http://chirpstream.twitter.com/2b/user.json" USER = "segphault" PASS = "XXXXXXXXX" def on_receive(data):   print data conn = pycurl.Curl() conn.setopt(pycurl.USERPWD, "%s:%s" % (USER, PASS)) conn.setopt(pycurl.URL, STREAM_URL) conn.setopt(pycurl.WRITEFUNCTION, on_receive) conn.perform()