{"id":15594728,"url":"https://github.com/innei/uikit-learning","last_synced_at":"2025-08-31T23:39:02.728Z","repository":{"id":50945380,"uuid":"334354459","full_name":"Innei/UIKit-learning","owner":"Innei","description":null,"archived":false,"fork":false,"pushed_at":"2023-03-22T23:40:02.000Z","size":1505,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-04T10:56:43.868Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Innei.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-30T07:25:56.000Z","updated_at":"2022-02-08T08:57:42.000Z","dependencies_parsed_at":"2024-10-03T00:41:37.946Z","dependency_job_id":"3b0825ed-0da3-4645-85e8-f0beac2ef00d","html_url":"https://github.com/Innei/UIKit-learning","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Innei%2FUIKit-learning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Innei%2FUIKit-learning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Innei%2FUIKit-learning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Innei%2FUIKit-learning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Innei","download_url":"https://codeload.github.com/Innei/UIKit-learning/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246174609,"owners_count":20735417,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T00:41:29.847Z","updated_at":"2025-03-29T11:15:39.972Z","avatar_url":"https://github.com/Innei.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Project-2\n\n以下内容我随便写写\n\n初始的 UIViewController 可以直接 Embed in UINavigationController\n\nUIView 之间可以 Control + Drag 的方式在各个 View 之间设置相对位置，居中之类的\n\nUIButton 通过连接的方式可以设置 onTap。直接 Drag 到连接函数。\n\n多个 UIButton 连接同一个函数，可以通过设置每个 UIButton 的 tag 区分。\n\n```swift\n@IBAction func buttonTapped(_ sender: UIButton) {\n  var title: String\n\n  if sender.tag == correctAnswer {\n    title = \"Correct\"\n    score += 1\n  } else {\n    title = \"Wrong\"\n    score -= 1\n  }\n}\n```\n\nUIAlartController 使用\n\n```swift\nlet ac = UIAlertController(title: title, message: \"Your score is \\(score).\", preferredStyle: .alert)\nac.addAction(UIAlertAction(title: \"Continue\", style: .default, handler: askQuestion))\npresent(ac, animated: true)\n```\n\n\n# Referrence\n\n\u003chttps://www.hackingwithswift.com/read/2\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finnei%2Fuikit-learning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finnei%2Fuikit-learning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finnei%2Fuikit-learning/lists"}