Posts

Using core plot

An excellent tutorial on getting started with core-plot for adding graphs to mac and iOS apps. http://www.switchonthecode.com/tutorials/using-core-plot-in-an-iphone-application

Postgres on Mac

VIA:     http://www.peerassembly.com/2011/08/09/installing-postgresql-on-lion/              http://digitheadslabnotebook.blogspot.in/2011/10/postgresql-cheat-sheet.html Install > brew install postgresql Initialize database >  initdb /usr/local/var/postgres Changing ownership >  sudo chown $USER /var/pgsql_socket/ Add to startup items >  mkdir -p ~/Library/LaunchAgents > cp /usr/local/Cellar/postgresql/9.0.4/org.postgresql.postgres.plist ~/Library/LaunchAgents/ Now, edit ~/Library/LaunchAgents/org.postgresql.postgres.plist in a text editor and look for this line: /usr/local/var/postgres/server.log Paste in the following lines immediately below it: -c unix_socket_directory=/var/pgsql_socket -c unix_socket_group=_postgres -c unix_socket_permissions=0770 Start the DB > launchctl load -w ~/Library/LaunchAgents/org.postgresql.postgres.plist Add the _postgres accou...

Kiosk Mode for iOS

via:  http://joris.kluivers.nl/blog/2012/03/02/kiosk-mode-for-ios/ Disabling store demo mode If you consider installing the configuration file included below make sure you understand how to disable this mode first. Mobile configuration files are used to configure phones in enterprises. Apple provides an app called the  iPhone Configuration Utility  (IPCU) to install and remove configurations. To disable store demo mode: Use IPCU to remove the configuration from the phone Reboot your device Installation The easiest way to enable Store Mode is to install the .mobileconfig file listed below. Installing using the IPCU did not work for me, but opening the file in Safari worked fine. Point Mobile Safari to: Mobile configuration file to disable the home button  (AppLock.mobileconfig, 1.8kb) Contents of the file available below, configure to your likings if you intend to distribute it yourself. PayloadContent Paylo...

Private Frameworks

Use Class-Dump to generate the header files for Private Frameworks Download: http://www.codethecode.com/projects/class-dump/ Usage: http://confluence.gordonturner.ca/display/NOTES/Using+class-dump ./class-dump -H /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/System/Library/PrivateFrameworks/PhotoLibrary.framework/PhotoLibrary -o /Applications/class-dump/class-dump-iPhone5.0-PhotoLibrary.framework otx tool reads out the the same information but along with machine code. Download: http://otx.osxninja.com/

JavaScript Tutorials

To begin with JavaScript http://www.w3schools.com/js JavaScript tutorials for people who already know how to program http://yuiblog.com/crockford/ Mozilla Dev Network https://developer.mozilla.org/en/JavaScript JavaScript Book http://eloquentjavascript.net/ Getting started with JQuery http://docs.jquery.com/Tutorials

Blocks Guide

http://rainbowcoding.com/simple-guide-to-objective-c-blocks/

UIView: Notification for view loaded

Depending on what kind of actions you need to perform, there are several techniques: -(id)initWithFrame:(CGRect)frame  - UIView's designated initializer; always sent to a UIView to initialize it, unless the view is loaded from a nib; -(id)initWithCoder:(NSCoder *)coder  - always sent to initialize a UIView whenever the view is loaded from a nib; -(void)awakeFromNib  - sent after all the objects in the nib are initialized and connected; applicable only if you load the object from a nib; you must call super; -(void)willMoveToSuperview:(UIView *)newSuperview  - sent immediately before the view is added as a subview to another view;  newSuperview  may be nil when you remove the view from its superview; -(void)willMoveToWindow:(UIWindow *)newWindow  - sent immediately before the view (or its superview) is added to a window;  newWindow  may be nil when you remove the view from a window; -(void)didMoveToSuperview  - sent immediately ...