{"id":32639,"date":"2024-11-01T09:10:31","date_gmt":"2024-11-01T09:10:31","guid":{"rendered":"http:\/\/atmokpo.com\/w\/?p=32639"},"modified":"2024-11-01T11:25:04","modified_gmt":"2024-11-01T11:25:04","slug":"swift-uikit-style-iphone-app-development-02-creating-a-hello-world-app-and-perfectly-adapting-to-xcode","status":"publish","type":"post","link":"https:\/\/atmokpo.com\/w\/32639\/","title":{"rendered":"Swift UIKit Style, iPhone App Development: 02 Creating a Hello World App and Perfectly Adapting to Xcode"},"content":{"rendered":"<p>Hello! In this course, we will learn how to develop iPhone apps using the UIKit framework with the Swift language. Specifically, our goal is to create a simple &#8216;Hello World&#8217; app as our first project to fully adapt to the Xcode environment. Through this course, you will familiarize yourself with various features of Xcode and understand the basic app structure.<\/p>\n<h2>1. Setting Up the Development Environment<\/h2>\n<p>To start developing iPhone apps, you need to set up the development environment first. Please follow the steps below.<\/p>\n<h3>1.1. Installing Required Programs<\/h3>\n<p>The following programs are necessary for iPhone app development:<\/p>\n<ul>\n<li><strong>Xcode<\/strong>: Apple&#8217;s official integrated development environment (IDE), essential for designing and developing apps.<\/li>\n<li><strong>macOS<\/strong>: Xcode runs only on macOS. It is recommended to use the latest version.<\/li>\n<\/ul>\n<p>Xcode can be downloaded for free from the Mac App Store. Once the installation is complete, let&#8217;s launch Xcode and set up the environment.<\/p>\n<h3>1.2. First Launch of Xcode<\/h3>\n<p>When you launch Xcode, the following screen will appear:<\/p>\n<ol>\n<li>Select <strong>Create a new Xcode project<\/strong> at the top left.<\/li>\n<li>In the template selection screen, choose <strong>App<\/strong> and click <strong>Next<\/strong>.<\/li>\n<li>Enter the project name and select the <strong>Swift<\/strong> language and <strong>UIKit<\/strong> interface.<\/li>\n<li>Choose a location to save the project and click <strong>Create<\/strong>.<\/li>\n<\/ol>\n<h2>2. Understanding the Structure of the &#8216;Hello World&#8217; App<\/h2>\n<p>Now, let&#8217;s take a look at the basic structure of the app. The template generated by Xcode contains the following files and folders:<\/p>\n<ul>\n<li><strong>AppDelegate.swift<\/strong>: An important file that manages the app&#8217;s lifecycle. It defines the tasks to be performed when the app starts or terminates.<\/li>\n<li><strong>SceneDelegate.swift<\/strong>: Manages various UI scenes of the app. It is useful for apps that support multiple windows.<\/li>\n<li><strong>Main.storyboard<\/strong>: A storyboard that allows visual design of the app&#8217;s user interface.<\/li>\n<li><strong>ViewController.swift<\/strong>: The view controller that constitutes the main screen of the app.<\/li>\n<\/ul>\n<h3>2.1. Main.storyboard<\/h3>\n<p>Clicking on the Main.storyboard file opens Interface Builder. Here, you can configure the app&#8217;s UI. By default, a ViewController is included, and we will add a label that says &#8216;Hello World&#8217; to this screen.<\/p>\n<h2>3. Creating the &#8216;Hello World&#8217; App<\/h2>\n<p>Now let&#8217;s actually create the &#8216;Hello World&#8217; app. Follow along!<\/p>\n<h3>3.1. Adding a Label<\/h3>\n<ol>\n<li>Open the Main.storyboard file and select the View Controller.<\/li>\n<li>Click the library button (+) at the top right to search for a Label object.<\/li>\n<li>Drag the label into the View Controller.<\/li>\n<li>Change the label&#8217;s text to &#8216;Hello World&#8217;.<\/li>\n<li>Adjust the label&#8217;s size and position it in the center.<\/li>\n<\/ol>\n<h3>3.2. Writing Swift Code<\/h3>\n<p>Now, let&#8217;s go to the ViewController.swift file and write some code. Refer to the sample code below:<\/p>\n<pre>\n<code>import UIKit\n\nclass ViewController: UIViewController {\n    \n    override func viewDidLoad() {\n        super.viewDidLoad()\n        \n        \/\/ Create label\n        let helloLabel = UILabel()\n        helloLabel.text = \"Hello World\"\n        helloLabel.textColor = .black\n        helloLabel.font = UIFont.systemFont(ofSize: 32, weight: .bold)\n        helloLabel.textAlignment = .center\n        helloLabel.translatesAutoresizingMaskIntoConstraints = false\n        \n        \/\/ Add label to view\n        view.addSubview(helloLabel)\n        \n        \/\/ Set auto layout constraints\n        NSLayoutConstraint.activate([\n            helloLabel.centerXAnchor.constraint(equalTo: view.centerXAnchor),\n            helloLabel.centerYAnchor.constraint(equalTo: view.centerYAnchor)\n        ])\n    }\n}\n<\/code>\n<\/pre>\n<h3>3.3. Running the App<\/h3>\n<p>After writing the code, click the play button (\u25b6\ufe0f) at the top to run the app. The simulator will open, and you will see a label that says &#8216;Hello World&#8217; in the center.<\/p>\n<h2>4. Getting Familiar with Xcode&#8217;s Key Features<\/h2>\n<p>Now that we have created a basic app, let&#8217;s familiarize ourselves with various features of Xcode.<\/p>\n<h3>4.1. Using Interface Builder<\/h3>\n<p>Interface Builder is a tool that allows you to design your app&#8217;s UI visually. Let&#8217;s learn how to add and arrange various UI elements here. You can create custom UI elements or utilize existing ones to design your own unique interface.<\/p>\n<h3>4.2. Using the Code Editor<\/h3>\n<p>You also need to learn how to use Xcode&#8217;s code editor. It offers various features such as syntax highlighting, code autocompletion, and code error detection. Particularly, effectively utilizing the code autocompletion feature can greatly enhance your development speed.<\/p>\n<h3>4.3. Version Control Features<\/h3>\n<p>Xcode has built-in Git support, making version control easy. You can collaborate with team members smoothly or easily restore previous versions of the project using Git.<\/p>\n<h2>5. App Distribution Process<\/h2>\n<p>After developing the application, the distribution process is also important. After joining the Apple Developer Program, you can distribute your app on the App Store, making it available to users worldwide.<\/p>\n<h3>5.1. Joining the Apple Developer Program<\/h3>\n<p>By joining the Apple Developer Program, you can distribute your app on the App Store. There is an annual fee, and you can access various tools and resources.<\/p>\n<h3>5.2. App Submission Process<\/h3>\n<p>To submit the app, you need to go through the archiving process in Xcode. Select <strong>Product &gt; Archive<\/strong> from the project menu to create an archive, and the Organizer window will open. Follow the instructions for the distribution and submission steps here.<\/p>\n<h2>6. Conclusion<\/h2>\n<p>In this course, we learned the basics of using Xcode by creating a &#8216;Hello World&#8217; app with the Swift language. We have solidified our foundation for developing real apps using the UIKit framework. Moving forward, I hope to learn about various features and frameworks and develop more complex and interesting apps.<\/p>\n<p>Thank you!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hello! In this course, we will learn how to develop iPhone apps using the UIKit framework with the Swift language. Specifically, our goal is to create a simple &#8216;Hello World&#8217; app as our first project to fully adapt to the Xcode environment. Through this course, you will familiarize yourself with various features of Xcode and &hellip; <a href=\"https:\/\/atmokpo.com\/w\/32639\/\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;Swift UIKit Style, iPhone App Development: 02 Creating a Hello World App and Perfectly Adapting to Xcode&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[127],"tags":[],"class_list":["post-32639","post","type-post","status-publish","format-standard","hentry","category-swift-iphone-app-development-uikit"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Swift UIKit Style, iPhone App Development: 02 Creating a Hello World App and Perfectly Adapting to Xcode - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/atmokpo.com\/w\/32639\/\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Swift UIKit Style, iPhone App Development: 02 Creating a Hello World App and Perfectly Adapting to Xcode - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"og:description\" content=\"Hello! In this course, we will learn how to develop iPhone apps using the UIKit framework with the Swift language. Specifically, our goal is to create a simple &#8216;Hello World&#8217; app as our first project to fully adapt to the Xcode environment. Through this course, you will familiarize yourself with various features of Xcode and &hellip; \ub354 \ubcf4\uae30 &quot;Swift UIKit Style, iPhone App Development: 02 Creating a Hello World App and Perfectly Adapting to Xcode&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/atmokpo.com\/w\/32639\/\" \/>\n<meta property=\"og:site_name\" content=\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"article:published_time\" content=\"2024-11-01T09:10:31+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-01T11:25:04+00:00\" \/>\n<meta name=\"author\" content=\"root\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@bebubo4\" \/>\n<meta name=\"twitter:site\" content=\"@bebubo4\" \/>\n<meta name=\"twitter:label1\" content=\"\uae00\uc4f4\uc774\" \/>\n\t<meta name=\"twitter:data1\" content=\"root\" \/>\n\t<meta name=\"twitter:label2\" content=\"\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04\" \/>\n\t<meta name=\"twitter:data2\" content=\"4\ubd84\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/atmokpo.com\/w\/32639\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/32639\/\"},\"author\":{\"name\":\"root\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\"},\"headline\":\"Swift UIKit Style, iPhone App Development: 02 Creating a Hello World App and Perfectly Adapting to Xcode\",\"datePublished\":\"2024-11-01T09:10:31+00:00\",\"dateModified\":\"2024-11-01T11:25:04+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/atmokpo.com\/w\/32639\/\"},\"wordCount\":793,\"publisher\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\"},\"articleSection\":[\"Swift iPhone app development (UIKit)\"],\"inLanguage\":\"ko-KR\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/atmokpo.com\/w\/32639\/\",\"url\":\"https:\/\/atmokpo.com\/w\/32639\/\",\"name\":\"Swift UIKit Style, iPhone App Development: 02 Creating a Hello World App and Perfectly Adapting to Xcode - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#website\"},\"datePublished\":\"2024-11-01T09:10:31+00:00\",\"dateModified\":\"2024-11-01T11:25:04+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/atmokpo.com\/w\/32639\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/atmokpo.com\/w\/32639\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/atmokpo.com\/w\/32639\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\ud648\",\"item\":\"https:\/\/atmokpo.com\/w\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Swift UIKit Style, iPhone App Development: 02 Creating a Hello World App and Perfectly Adapting to Xcode\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/atmokpo.com\/w\/#website\",\"url\":\"https:\/\/atmokpo.com\/w\/\",\"name\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/atmokpo.com\/w\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ko-KR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\",\"name\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"url\":\"https:\/\/atmokpo.com\/w\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png\",\"contentUrl\":\"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png\",\"width\":400,\"height\":400,\"caption\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\"},\"image\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/bebubo4\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\",\"name\":\"root\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g\",\"caption\":\"root\"},\"sameAs\":[\"http:\/\/atmokpo.com\/w\"],\"url\":\"https:\/\/atmokpo.com\/w\/author\/root\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Swift UIKit Style, iPhone App Development: 02 Creating a Hello World App and Perfectly Adapting to Xcode - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/atmokpo.com\/w\/32639\/","og_locale":"ko_KR","og_type":"article","og_title":"Swift UIKit Style, iPhone App Development: 02 Creating a Hello World App and Perfectly Adapting to Xcode - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","og_description":"Hello! In this course, we will learn how to develop iPhone apps using the UIKit framework with the Swift language. Specifically, our goal is to create a simple &#8216;Hello World&#8217; app as our first project to fully adapt to the Xcode environment. Through this course, you will familiarize yourself with various features of Xcode and &hellip; \ub354 \ubcf4\uae30 \"Swift UIKit Style, iPhone App Development: 02 Creating a Hello World App and Perfectly Adapting to Xcode\"","og_url":"https:\/\/atmokpo.com\/w\/32639\/","og_site_name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","article_published_time":"2024-11-01T09:10:31+00:00","article_modified_time":"2024-11-01T11:25:04+00:00","author":"root","twitter_card":"summary_large_image","twitter_creator":"@bebubo4","twitter_site":"@bebubo4","twitter_misc":{"\uae00\uc4f4\uc774":"root","\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04":"4\ubd84"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/atmokpo.com\/w\/32639\/#article","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/32639\/"},"author":{"name":"root","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7"},"headline":"Swift UIKit Style, iPhone App Development: 02 Creating a Hello World App and Perfectly Adapting to Xcode","datePublished":"2024-11-01T09:10:31+00:00","dateModified":"2024-11-01T11:25:04+00:00","mainEntityOfPage":{"@id":"https:\/\/atmokpo.com\/w\/32639\/"},"wordCount":793,"publisher":{"@id":"https:\/\/atmokpo.com\/w\/#organization"},"articleSection":["Swift iPhone app development (UIKit)"],"inLanguage":"ko-KR"},{"@type":"WebPage","@id":"https:\/\/atmokpo.com\/w\/32639\/","url":"https:\/\/atmokpo.com\/w\/32639\/","name":"Swift UIKit Style, iPhone App Development: 02 Creating a Hello World App and Perfectly Adapting to Xcode - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/#website"},"datePublished":"2024-11-01T09:10:31+00:00","dateModified":"2024-11-01T11:25:04+00:00","breadcrumb":{"@id":"https:\/\/atmokpo.com\/w\/32639\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/atmokpo.com\/w\/32639\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/atmokpo.com\/w\/32639\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\ud648","item":"https:\/\/atmokpo.com\/w\/en\/"},{"@type":"ListItem","position":2,"name":"Swift UIKit Style, iPhone App Development: 02 Creating a Hello World App and Perfectly Adapting to Xcode"}]},{"@type":"WebSite","@id":"https:\/\/atmokpo.com\/w\/#website","url":"https:\/\/atmokpo.com\/w\/","name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","description":"","publisher":{"@id":"https:\/\/atmokpo.com\/w\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/atmokpo.com\/w\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ko-KR"},{"@type":"Organization","@id":"https:\/\/atmokpo.com\/w\/#organization","name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","url":"https:\/\/atmokpo.com\/w\/","logo":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/","url":"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png","contentUrl":"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png","width":400,"height":400,"caption":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8"},"image":{"@id":"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/bebubo4"]},{"@type":"Person","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7","name":"root","image":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g","caption":"root"},"sameAs":["http:\/\/atmokpo.com\/w"],"url":"https:\/\/atmokpo.com\/w\/author\/root\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/32639","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/comments?post=32639"}],"version-history":[{"count":1,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/32639\/revisions"}],"predecessor-version":[{"id":32640,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/32639\/revisions\/32640"}],"wp:attachment":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/media?parent=32639"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/categories?post=32639"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/tags?post=32639"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}