Objective-c’s Addresses and Pass by References

In CPU, a switch is to describe a bit. A bit represent either 0 or 1. You switch on or off. 1 or 0. Thus, its called a switch. Eight of these bits make up a byte. Each representation of these bits make up a representation. For example, in a byte, we can have: 00000000 […]


Every function can have local variables. Local variables are variables declared inside a function. They exist only during the execution of that function and can only be accessed from within that function. For example, imagine that you were writing a function that computed how long to cook a turkey. It might look like this:


iPad: add a popover view on Navigation Bar

In your app delegate, have property for the current ViewController class:

Then in our didFinishLaunchingWithOptions method, we allocate this main ViewController, which we will insert into a newly created UINavigationController variable. We create this new UINavigationController below:

This way, our root is this navigation controller. And the navigation controller’s first page is our […]

Java is always pass by value

Java is always pass-by-value. The difficult thing can be to understand that Java passes objects as references and those references are passed by value. It goes like this:


ref: http://stackoverflow.com/questions/40480/is-java-pass-by-reference-or-pass-by-value?rq=1 The Java Spec says that everything in Java is pass-by-value. There is no such thing as “pass-by-reference” in Java. The key to […]

Objective C parameter passing

ref: http://stackoverflow.com/questions/2892520/passing-arguments-by-value-or-by-reference-in-objective-c Jared P is wrong, objective-C only support passing parameters by value. The problem here has probably been fixed already (Since this question is more than a year old) but I need to clarify some things regarding arguments and Objective-C. Objective-C is a strict superset of C which means that everything C does, Obj-C […]

Objective properties

ref: http://stackoverflow.com/questions/8927727/objective-c-arc-strong-vs-retain-and-weak-vs-assign?rq=1 http://stackoverflow.com/questions/11013587/differences-between-strong-and-weak-in-objective-c atomic (default) nonatomic strong=retain (default) weak retain assign (default) unsafe_unretained copy readonly readwrite (default) strong (iOS4 = retain ) it says “keep this in the heap until I don’t point to it anymore” in other words ” I’am the owner, you cannot dealloc this before aim fine with that same as retain” […]

Dismiss TextView or TextField

1) When clicking ‘Done’ Put protocol UITextViewDelegate and/or UITextFieldDelegate in there…

set up the variable….make sure you add target for the method UIControlEventEditingDidEndOnExit:

Implement the method:

2) To dismiss Keyboard on tap of the View: view controller’s header:

view controller’s viewDidLoad:

view controller:

Finally, follow this link http://rickytsao.com/?p=1299 in […]