Bo2SS

Bo2SS

0 Course Introduction and Pre-development Preparation

Why learn iOS development and use the Objective-C language?

Currently, enterprise-level apps are still a blue ocean, and iOS is one of the two fundamental platforms in mobile development.
In the era of the Internet of Things, technical implementation and engineering thinking go hand in hand, and are more important than the language itself.
Compared to the emerging Swift, Objective-C is more stable and more suitable for large-scale projects.

Course Outline#

  1. Development Preparation: Xcode is the main development environment.
  2. Basic Pages: Familiarize yourself with the basic structure of pages, create and use various modules, and understand the related principles.
  3. Basic Functionality: Understand the invisible underlying modules.
  4. Auxiliary Functionality: Learn about commonly used auxiliary functions.

Common App Types and Technology Stacks#

  • Common App Types: IM communication, video streaming, camera, news, tools and shopping.
  • Technology Stacks
    • App Display and Animation: Bottom TabBar, Navigation, List, Image, Button, Tag, Text, Webpage, Common Animations. Think of the WeChat app.
    • App Common Technical Architecture: Networking, Storage, Image, Audio and Video, Data Parsing, Layout Rendering, Startup, Logging System, Reporting System.
    • App Common Functions: Complex content pages, Login, Sharing, Channel Management, Push Notifications, Location, Plugins, Certificates, App Store Submission.

Everything Starts with "HelloWorld!" ❗️#

Preparation

  • Installation: Download from the App Store.
  • Project Creation: Create an iOS application and fill in the basic project information.
  • Layout: Left - directory structure, Middle - code, Right - file configuration, Bottom - debugging.
  • PS: You can configure the project by clicking on the project file.

Code

image-20210801230828223

  • Function Definition
    • Format: -/+ (returnType)methodName:(argType1)argName1 joiningName2:(argType2)argName2 {}
    • Function Name: methodName
    • Generally, "joiningName" can be the same as "argName".
  • Function Call Format: [obj methodName var joiningName2];

PS

  • self and super
    • self: Refers to the object that calls the method.
    • super: It is a keyword that represents calling a method from the parent class.
    • Refer to self and super in Objective-C - Jian Shu
  • Using the "." symbol: Accessing an object's property.
  • addSubview: followed by "({})": It is an extension of gcc that simplifies code and improves readability.
    • {} can contain multiple statements.
    • () makes the last expression in {} the return value of the entire expression.
  • Using @"": Quickly build a string.
  • CGPointMake: It is an inline function, so square brackets are not needed.
    • During compilation, the function body will be replaced with a function call, which eliminates the need to create a function call on the stack, thus improving runtime speed.
    • However, it increases the size of the binary file.

Output

image-20210801231018919

Tips#

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.