Understanding Automatic Reference Counting in Objective-C
In Objective-C, pointers manage memory by referencing addresses. A pointer variable stores an address, its value is that address, and the memory unit value is the data at that address. By default, pointers are strong, marked with the strong keyword. Weak pointers are declared using __weak, such as __weak Person *p;.
Automatic Reference Counting ...
Posted on Fri, 18 Sep 2026 16:10:35 +0000 by raymie
Understanding Objective-C Property Attributes and Memory Management
In Objective-C, the @property directive simplifies the declaration of accessor methods and instance variables. At compile time, the compiler automatically synthesizes an instance variable (prefixed with an underscore), a getter, and a setter for each property. This process is known as "auto-synthesis".
The synthesized methods access t ...
Posted on Thu, 10 Sep 2026 16:14:05 +0000 by ezekiel
Building a Simple Login Interface for iOS
This tutorial demonstrates how to create a basic login screen for iOS, similar to QQ's login interface.
Application Entry Point
The main.m file serves as the entry point for every iOS application. It initializes the UIApplication instance and sets up the app delegate.
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int ...
Posted on Sun, 09 Aug 2026 16:31:27 +0000 by r3n
Data Passing Between iOS View Controllers
This article explores the various methods for passing data between view controllers in iOS development, covering property-based approaches, delegate patterns, notifications, singletons, and closures.
Environment Setup
Before implementing data passing, set up the navigation hierarchy in the application delegate. The following code initializes th ...
Posted on Sun, 09 Aug 2026 16:19:37 +0000 by mfalomir
iOS Deep Dive: Exploring the Internals of Classes and Objects
The Essence of Classes and Objects
When we create a MyClass in Objective-C and instantiate it in main, what does Objective-C actually look like underneath?
First, we need to understand the underlying structure of Objective-C objects. Objective-C code is essentially converted to C/C++ code. Use the following command to convert main.m to C++:
cla ...
Posted on Fri, 31 Jul 2026 16:57:49 +0000 by LordMalek
Memory Management Fundamentals in Objective-C
Objective-C applications receive a memory warning from the system when memory usage exceeds approximately 20 MB. Upon receiving this warning, the application must release unnecessary memory by deallocating unused objects and variables to prevent crashes.
Memory management in Objective-C specifically handles objects that inherit from NSObject, n ...
Posted on Fri, 31 Jul 2026 16:12:25 +0000 by Crow
Building Custom iOS UI Components with XIB and Programmatic Layout
A custom UI component begins with an Interface Builder file. Start by creating a new file and selecting the User Interface category, then choose View. This generates a .xib file containing an empty view.
Design your reusable interface within this .xib file. Ensure you connect the File's Owner's Class in the "Custom Class" section to t ...
Posted on Tue, 21 Jul 2026 16:57:35 +0000 by NYSiRacer
Objective-C Property Accessors and Dot Notation Fundamentals
Accessing object state in Objective-C through dot notation offers a streamlined syntax that the compiler translates into standard mesage sends. When encountering an assignment like staff.identifier = 4021, the compiler converts this too [staff setIdentifier:4021]. For value retrieval such as int currentId = staff.identifier, the expression beco ...
Posted on Thu, 09 Jul 2026 16:49:07 +0000 by homer09001
Deep Dive into Objective-C Block Syntax and Memory Semantics
Fundamentals of Blocks
Introduced in iOS 4, Blocks are a powerful C-language extension anabling anonymous function functionality. They behave as unique data types that can be assigned to variables, passed as arguments, or returned from functions. Beyond simple storage, blocks encapsulate executable code segments that can be invoked later when n ...
Posted on Fri, 26 Jun 2026 17:30:08 +0000 by coverman
iOS Device System Utilities: Network, Memory, and Battery Information
This article demonstrates an implementation of core system utility functions for iOS devices, providing capabilities to retrieve device information, network addresses, memory statistics, and battery status.
System Information Header
//
// DeviceSystem.h
// PhoneManager
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
...
Posted on Sun, 31 May 2026 17:51:49 +0000 by nepeaNMedia