Object Model of objective C is derived from SmallTalk. It has its basis in SmallTalk. Few things to know before understanding the Object Model.
CodeWithKarma is a blog that is created to write articles about day to day implementations in real life project. I write about different set of technologies like C#, Swift, SwiftUI, .Net, Azure, CI/CD, Native iOS, Hybrid app development like Ionic.
Thursday, September 26, 2013
Tuesday, September 24, 2013
IBAction and IBOutlet keywords
(IBAction)selectedCard:(UIButton *)sender {
IBAction is nothing but typedef void. Xcode puts this to keep track that this not a random method that returns void but an Action method that connects view to the controller.
@property (weak, nonatomic) IBOutlet UILabel *selecedLabel;
Monday, September 23, 2013
Application Delegate
Every iOS application must contain an application delegate object. Application Delegate class is responsible for handling all kind of events happen in the application. The root class is UIApplication.
We do not subclass the UIApplication class to customize the handing of different kind of events, rather we provide an AppDelegate class that implements UIApplicationDelegate protocol. We provide this delegate class to the UIApplicaiton class which will sendd notifications to AppDelegate class for each of the application level event.
We do not subclass the UIApplication class to customize the handing of different kind of events, rather we provide an AppDelegate class that implements UIApplicationDelegate protocol. We provide this delegate class to the UIApplicaiton class which will sendd notifications to AppDelegate class for each of the application level event.
Wednesday, September 11, 2013
Difference between Weak and Strong keywords
Strong means you want to keep control over the lifetime of the object. If an object is marked as strong mean object remains in the heap until you point that object strongly. If you send the object to nil only than it will be collected by the Garbage collection.
Weak means you don't want to keep control over the lifetime of the object. A weak reference does not extend the lifetime of the object it points to, and automatically becomes
you can find more details about ARC(Automatic Reference Counting) Click Here...
Weak means you don't want to keep control over the lifetime of the object. A weak reference does not extend the lifetime of the object it points to, and automatically becomes
nil
when there are no strong references to the object. If no one is pointing the object strongly than the object will be collected by the heap.you can find more details about ARC(Automatic Reference Counting) Click Here...
Tuesday, September 10, 2013
What is "id" in Objective C
id
'id' is a typedef in objective C. This means "Pointer to an Object". This Object can be any object of Objective C.typedef struct objc_class *Class; typedef struct objc_object { Class isa; } *id; typedef struct objc_selector *SEL; typedef id (*IMP)(id, SEL, ...);
Subscribe to:
Posts (Atom)