This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ugliness of iOS Programming | |
First of all, i love iOS and iOS development ecosystem. | |
However, after I quick learnt Ruby on Rails, I found how messy iOS Programming Frameworks are. Apple guys must feel innocent on this. They have worked hard to make the frameworks easy to use, powerful yet flexible. | |
one end is, "there is more than one way to do a thing". I first heard it from Perl, which they are proud of that.. However, the downside of this is there is no conversion or culture. | |
There is no so-called application framework for iOS officially from Apple. After rough understanding on UIKit and Foundation, the developers need a further direction on how to improve the productivity on iOS development. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WelcomeToBlockWorld | |
http://www.cocoawithlove.com/2009/10/ugly-side-of-blocks-explicit.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iOS & RoR | |
Wired combination? In my past 12 years, I have used more than these technologies on GUI and Web. Finally I fell in these 2. | |
One feature charms me in RoR is the feature of metaprogramming. Ruby supports it and Rails fully uses it. It sucks me into deeper thought on metaphysics of programming. Why are we (as programmers) here? What can machine (software) facilitates men (programmers) ? I would like to share some of my ideas. | |
Before iOS, I was working intensively with Adobe Flex. The beauty of Flex's flexible architecture attacks me, plus its UI expressiveness. I was my dream back in 2005, to present fancier UI on Web via programmable Flash. In 2010, the year I came to meet iOS, there was the debate on whether Flash should be run on iOS, I was wondering whether I should go for iOS. I became so determined after I realised the depth and width of iOS technologies are much greater than of Flash/Flex. Another obviously plus on iOS is, I can carry on my program anywhere I go. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://stackoverflow.com/questions/4974039/rails-project-organization-with-many-models | |
http://stackoverflow.com/questions/6550103/in-which-folder-should-i-put-global-shared-partial-templates | |
http://stackoverflow.com/questions/6550103/in-which-folder-should-i-put-global-shared-partial-templates | |
<pre><code>$ cd your_repo_root/repo_name | |
$ git fetch origin | |
$ git checkout gh-pages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I was in somehow confused to use ZipArchive. | |
First of all, I do not know which one is the "official" version of it. | |
https://github.com/mattconnolly/ZipArchive | |
Or | |
http://code.google.com/p/ziparchive/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Here is my sum on which callback mechanism should be used for which cases. | |
- for UIView and UIVC, use delegate | |
- for model change, use NSNotification or KVO. However, KVO is not designed for communicating "events", therefore NSNotif is the preferred. | |
- for Data Access, use block. | |
for UIControl subclass, use target-action. | |
Bye Delegate, Hello Block |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://svnbook.red-bean.com/en/1.0/index.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
After 3 years of iOS development practice, finally I have chance to fully work with the soft keyboard. I found the Apple official docs is far from enough to deal with every cases of iOS soft keyboard. Then online 3rd party docs are helpful but not complete either. I can understand it since everyone is busy, very few people to write a complete guide for any specific topics. | |
Then I come to this. I have to do trial and error to grasp this piece of knowledge. One problem I was facing is when device is in landscape, you cannot use keyboard's height to adjust textview/tableview's contentInsets, since the height actually seems as its "width". UIWindow is mounted always in portrait mode, and keyboard frame goes with it. When device and UI is in landscape, the keyboard frame is still measured as it is in portrait. The solution: | |
CGRect frameEnd = [[notif.userInfo objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue]; | |
frameEnd = [self.view convertRect: frameEnd fromView: nil]; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return [self.object valueForKey: attrName]; | |
-- | |
SEL getterSEL = NSSelectorFromString( attrName); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class_addIvar, in Objective-C runtime, is useless, because it does not support to add ivar in an EXISTING class. | |
https://developer.apple.com/library/ios/documentation/Cocoa/Reference/ObjCRuntimeRef/Reference/reference.html#//apple_ref/c/func/class_addIvar | |
You can use the concept of idInfo (see id-ego-superego), to add run-time generated objects' property. | |
OlderNewer