UIKIt学习笔记—App and Environment部分(二)

Swift iOS开发实战:从ARC内存管理到App Store审核避坑指南 Swift作为iOS开发的核心语言,其价值远不止类型安全与语法简洁——它深度耦合UIKit生命周期、ARC内存模型与结构化并发机制。理解Optional如何根治空值崩溃、Result与async/await如何重构异步错误处理、@StateObject与@Binding如何划定状态边界,是构建高稳定性App的基础。尤其在真实生产环境中,内存泄漏、SIGABRT崩溃、网络超时、Preview预览失败等高频问题,本质都源于对Swift与iOS平台协同逻辑的误读。本文聚焦Swift在UIKit和SwiftUI双栈 阅读详情

今天是2021年12月29日,西安封城第七天

Preserving Your App’s UI Across Launches

At appropriate times, UIKit preserves the state of your app’s views and view controllers to an encrypted file on disk. When your app is terminated and relaunched later, UIKit reconstructs your views and view controllers from the preserved data. The preservation and restoration processes are initiated automatically, but you must also do some specific work to support those processes:

  1. Enable support for state preservation and restoration.
  2. Assign restoration identifiers to the view controllers that you want
    to preserve.
  3. Recreate view controllers, as needed, at restoration time.
  4. Encode and decode the custom data that you need to restore your view controller to its previous state.

If you define your interface entirely in storyboards, UIKit knows how to recreate your view controllers, and does so automatically. If you do not use storyboards, or if you want more control over the creation and initialization of your view controllers, you can create them yourself.
系统在运存不够的情况下会清理后台应用,所以建议用户不要做把应用挂到后台后台还能给你保存状态的白日梦了,建议多花点钱上pro max,这样白日梦就能稍微成真了
当然UIKit也不是啥用都没有,他会在合适的时间将View和VC状态保存到一个磁盘上的编码文件里头去,再次打开时会重建View和VC,整个过程自动完成,但你得劳烦配置一下它!

  1. 开启支持保存和重载选项
  2. 给每个需要保存状态的VC配一个重载标识符
  3. 在重载时重载需要的VC
  4. 编解码重载VC时需要的数据

如果用SB,UIKit会自动重建VC,如果你像我一样不用SB,那你需要自己弄

You opt-in to state preservation and restoration by implementing your app delegate’s application(:shouldSaveApplicationState:) and application(:shouldRestoreApplicationState:) methods. Both methods return a Boolean value indicating whether the associated process should occur, and in most cases you simply return true. However, you can return false at times when restoring your app’s interface might not be appropriate.
When UIKit calls your application(:shouldSaveApplicationState:) method, you can save data in addition to returning true. You might save data that you intend to use during the restoration process.
可以通过实现app代理的application(
:shouldSaveApplicationState:) 和 application(_:shouldRestoreApplicationState:) 方法状态保存和重载机制
这俩方法决定了相关过程是否发生,正常情况下返回true,也可以在适当情况下让他返回false
可以在application(_:shouldSaveApplicationState:)方法中对数据进行存储以便于后期重载VC时使用

For example, Listing 1 shows an example that saves the app’s current version number. At restoration time, the application(_:shouldRestoreApplicationState:) method checks the version number in the archive and prevents restoration from occurring if it does not match the expected version.

//Listing 1 Declaring support for state preservation and restoration
func application(_ application: UIApplication, 
            shouldSaveApplicationState coder: NSCoder) -> Bool {
   // Save the current app version to the archive.
   coder.encode(11.0, forKey: "MyAppVersion")
        
   // Always save state information.
   return true
}
    
func application(_ application: UIApplication, 
            shouldRestoreApplicationState coder: NSCoder) -> Bool {
   // Restore the state only if the app version matches.
   let version = coder.decodeFloat(forKey: "MyAppVersion")
   if version == 11.0 {
      return true
   }
    
   // Do not restore from old data.    
   return false
}

If you prevent restoration from occurring, you can still configure your app’s interface manually in the application(_:didFinishLaunchingWithOptions:) method of your app delegate.

The name of the view controller class is usually a suitable restoration identifier, but you may use any string. Add that string to the view controller in your storyboard file or assign it to the view controller’s restorationIdentifier property at runtime.
请添加图片描述

At preservation time, UIKit attempts to preserve the root view controllers of your app’s windows. For each root view controller with a restoration identifier, UIKit asks that view controller to encode its custom data in an archive. A container view controller can encode references to its child view controllers as part of its custom data. If it does, and if those view controllers also have restoration identifiers, UIKit attempts to preserve the child view controllers and their contents. This process continues recursively, following the connections from one view controller to the next until all of them are saved or ignored.
You are not required to assign a restoration identifier to every view controller. In fact, there are times when you might not want to preserve all of your view controllers. For example, if your app displays a temporary login screen, you might not want that screen preserved. Instead, you would want to determine at restoration time whether to display it. In that case, you would not assign a restoration identifier to the view controller for your login screen.

重载标识符一般就是VC的名字,但你可以用其他任何字符
我不用SB,所以就只能在运行时把重载标识符赋值到restorationIdentifier属性里去
保存时,UIKit会尝试 保存window的根视图,对于每个拥有重载标识符的根视图,UIKit都会让他们把自己的数据存档,容器类VC可以将自己的引用编码到子VC中作为子VC的数据的一部分。
不需要给每个VC都赋重载标识符,按需分配

Encode and Decode Custom Information for Your App

During the preservation process, UIKit calls the encodeRestorableState(with:) method of each preserved view and view controller. Use this method to preserve the information that you need to return the view or view controller to its current state.

  1. Do save details about the visual state of views and controls.
  2. Do save references to child view controllers that you also want to
    preserve.
  3. Do save information that can be discarded without affecting the
    user’s data
  4. Do not include data that is already in your app’s persistent
    storage.Instead, include an identifier that you can use to locate that data later.

State preservation is not a substitute for saving your app’s data to disk. UIKit can discard state preservation data at its discretion, allowing your app to return to its default state. Use the preservation process to store information about the state of your app’s user interface, such as the currently selected row of a table. Do not use it to store the data contained in that table.
保存状态时,UIKit会调用每个被保存的View或VC的 encodeRestorableState(with:)方法,用来保存重载时需要的信息

  1. 储存视觉状态的细节,比如滚动视图滚到哪那种
  2. 储存它所有需要重载的子VC
  3. 储存可以在不影响用户数据的情况下丢弃的信息
  4. 不要存那些已经在内存里的东西,给他一个标记之后能取出来就行

别想着拿它存app数据,存一存界面信息就行了
Listing 2 shows an example of a view controller with text fields for gathering a first and last name. If one of the text fields contains an unsaved value, the method saves the unsaved value and an identifier for which text field contains that value. In this case, the unsaved value is not part of the app’s persistent data; it is a temporary value that can be discarded if needed.

//Listing 2 Encoding the state of a view controller
override func encodeRestorableState(with coder: NSCoder) {
   super.encodeRestorableState(with: coder)
        
   // Save the user ID so that we can load that user later.
   coder.encode(userID, forKey: "UserID")

   // Write out any temporary data if editing is in progress.
   if firstNameField!.isFirstResponder {
      coder.encode(firstNameField?.text, forKey: "EditedText")
      coder.encode(Int32(1), forKey: "EditField")
   }
   else if lastNameField!.isFirstResponder {
      coder.encode(lastNameField?.text, forKey: "EditedText")
      coder.encode(Int32(2), forKey: "EditField")
   }
   else {
      // No editing was in progress.
      coder.encode(Int32(0), forKey: "EditField")
   }
}

Create View Controllers When Asked

If preserved state information is available when your app is launched, the system attempts to restore your app’s interface using the preserved data.

  1. UIKit calls your app delegate’s
    application(_:shouldRestoreApplicationState:)
    method to determine if restoration should proceed.
  2. UIKit uses your app’s storyboards to recreate your view controllers.
  3. UIKit calls each view controller’s
    decodeRestorableState(with:)
    method to restore its state information.

UIKit loads both the view controller and its views from your storyboard initially. After those objects have been loaded and initialized, UIKit begins restoring their state information. Use your decodeRestorableState(with:) methods to return your view controller to its previous state.
如果app启动时保存的状态可用的话那么系统会尝试重载app的界面信息

  1. 调用代理的application(_:shouldRestoreApplicationState:)方法决定重载是否进行
  2. 用SB重建VC
  3. 调用decodeRestorableState(with:)解码状态信息
    Listing 3 shows the method for decoding the state that was encoded in Listing 2. This method restores the view controller’s data from the preserved user ID. If a text field was being edited, this method also restores the in-progress value and makes the corresponding text field the first responder, which displays the keyboard for that text field.
//Listing 3 Decoding the
override func decodeRestorableState(with coder: NSCoder) {
   super.decodeRestorableState(with: coder)
   
   // Restore the first name and last name from the user ID
   let identifier = coder.decodeObject(forKey: "UserID") as! String
   setUserID(identifier: identifier)

   // Restore an in-progress values that was not saved
   let activeField = coder.decodeInteger(forKey: "EditField")
   let editedText = coder.decodeObject(forKey: "EditedText") as! 
                         String?

   switch activeField {
      case 1:
         firstNameField?.text = editedText
         firstNameField?.becomeFirstResponder()
         break
            
      case 2:
         lastNameField?.text = editedText
         lastNameField?.becomeFirstResponder()
         break
            
     default:
         break  // Do nothing.
  }
}

Defining your view controllers in storyboards is the easiest way to manage state restoration, but it is not the only way.

Managing Your App’s Life Cycle

app的状态决定了他能干啥,正在运行的进程就可以获取系统资源,后台进程就只能做一些最必要的工作,所以app状态转换时你需要随时适配它的行为

When your app’s state changes, UIKit notifies you by calling methods of the appropriate delegate object:

  • In iOS 13 and later, use UISceneDelegate objects to respond to
    life-cycle events in a scene-based app.
  • In iOS 12 and earlier, use the UIApplicationDelegate object to
    respond to life-cycle events.

Note
If you enable scene support in your app, iOS always uses your scene delegates in iOS 13 and later. In iOS 12 and earlier, the system uses your app delegate.
当app状态改变时,UIKit会通过调用合适代理对象的方法去通知你
iOS13之后用UISceneDelegate 方法响应生命周期时间,iOS12之前用 UIApplicationDelegate

If your app supports scenes, UIKit delivers separate life-cycle events for each. A scene represents one instance of your app’s UI running on a device. The user can create multiple scenes for each app, and show and hide them separately. Because each scene has its own life cycle, each can be in a different state of execution. For example, one scene might be in the foreground while others are in the background or are suspended.
如果app支持窗口,那么他们之间是独立的,一个窗口就代表了在设备上运行的一个appUI的实例,窗口之间互不干扰并各有状态,支持窗口是个可选的设置,在info.plist里配置一下UIApplicationSceneManifest 键
Important
Scene support is an opt-in feature. To enable basic support, add the UIApplicationSceneManifest key to your app’s Info.plist file as described in Specifying the Scenes Your App Supports.

The following figure shows the state transitions for scenes. When the user or system requests a new scene for your app, UIKit creates it and puts it in the unattached state. User-requested scenes move quickly to the foreground, where they appear onscreen. A system-requested scene typically moves to the background so that it can process an event. For example, the system might launch the scene in the background to process a location event. When the user dismisses your app’s UI, UIKit moves the associated scene to the background state and eventually to the suspended state. UIKit can disconnect a background or suspended scene at any time to reclaim its resources, returning that scene to the unattached state.
An illustration showing the state transitions for a scene-based app. Scenes start in the unattached state and move to the foreground-active or background state. The foreground-inactive state acts as a transition state.
请添加图片描述

Use scene transitions to perform the following tasks:
When UIKit connects a scene to your app, configure your scene’s initial UI and load the data your scene needs.
When transitioning to the foreground-active state, configure your UI and prepare to interact with the user. See Preparing Your UI to Run in the Foreground.
Upon leaving the foreground-active state, save data and quiet your app’s behavior. See Preparing Your UI to Run in the Background.
Upon entering the background state, finish crucial tasks, free up as much memory as possible, and prepare for your app snapshot. See Preparing Your UI to Run in the Background.
At scene disconnection, clean up any shared resources associated with the scene.
In addition to scene-related events, you must also respond to the launch of your app using your UIApplicationDelegate object. For information about what to do at app launch, see Responding to the Launch of Your App.
Respond to App-Based Life-Cycle Events
In iOS 12 and earlier, and in apps that don’t support scenes, UIKit delivers all life-cycle events to the UIApplicationDelegate object. The app delegate manages all of your app’s windows, including those displayed on separate screens. As a result, app state transitions affect your app’s entire UI, including content on external displays.
The following figure shows the state transitions involving the app delegate object. After launch, the system puts the app in the inactive or background state, depending on whether the UI is about to appear onscreen. When launching to the foreground, the system transitions the app to the active state automatically. After that, the state fluctuates between active and background until the app terminates.
An illustration showing the state transitions for an app without scenes. The app launches into the active or background state. An app transitions through the inactive state.

Use app transitions to perform the following tasks:
At launch, initialize your app’s data structures and UI. See Responding to the Launch of Your App.
At activation, finish configuring your UI and prepare to interact with the user. See Preparing Your UI to Run in the Foreground.
Upon deactivation, save data and quiet your app’s behavior. See Preparing Your UI to Run in the Background.
Upon entering the background state, finish crucial tasks, free up as much memory as possible, and prepare for your app snapshot. See Preparing Your UI to Run in the Background.
At termination, stop all work immediately and release any shared resources. See applicationWillTerminate(😃.
Respond to Other Significant Events
In addition to handling life-cycle events, apps must also be prepared to handle the events listed in the following table. Use your UIApplicationDelegate object to handle most of these events. In some cases, you may also be able to handle them using notifications, allowing you to respond from other parts of your app.
Memory warnings
Received when your app’s memory usage is too high. Reduce the amount of memory your app uses; see Responding to Memory Warnings.
Protected data becomes available/unavailable
Received when the user locks or unlocks their device. See applicationProtectedDataDidBecomeAvailable(
😃 and applicationProtectedDataWillBecomeUnavailable(😃.
Handoff tasks
Received when an NSUserActivity object needs to be processed. See application(
:didUpdate:).
Time changes
Received for several different time changes, such as when the phone carrier sends a time update. See applicationSignificantTimeChange(😃.
Open URLs
Received when your app needs to open a resource. See application(
:open:options:).

iOS 冷启动优化记录 本文系统梳理了iOS应用冷启动优化实践,分为五个部分:1)分析App启动流程(pre-main的SystemInterface、RuntimeInit和after-main的UIKitInit等阶段);2)确立启动起止点测量方法;3)分段优化措施,包括pre-main阶段的动态库精简、二进制重排、+load方法治理,以及after-main的启动项异步化、首屏渲染优化;4)展示优化前后数据对比;5)提出二进制重排等未来优化方向。通过系统性分析各阶段耗时并针对性优化,有效提升了启动性能,为类似优化提供参考框架 阅读详情

相关推荐

iOS应用交易安全:集成Token SDK构建防篡改确认流程

在移动应用开发中,API安全与数据防篡改是保障交易可靠性的基石。其核心原理在于通过密码学技术,在客户端与服务器之间建立可信的验证通道,确保关键请求的完整性与不可否认性。这项技术的核心价值在于,它能有效抵御中间人攻击、重放攻击等常见威胁,为金融支付、电商交易等高敏感场景提供底层安全保障。具体到工程实践,开发者常借助安全中间件(如Token SDK)来简化实现。这类SDK通过封装设备指纹采集、交易数据签名等复杂逻辑,将安全能力转化为易用的API。例如,在iOS平台集成时,需重点关注Secure Enclave密

chuiqi9947的博客 410

iOS18+Xcode16: openURL弃用导致微信分享无响应的问题

iOS 18 + Xcode 16: openURL弃用导致微信分享无响应的问题

学习笔记 1万+

深入解析iOS/macOS动态链接器dyld:从原理到实战解决库加载失败

动态链接是现代操作系统的核心技术,它允许程序在运行时加载所需的代码库,而非在编译时静态打包。其核心原理在于通过动态链接器管理依赖关系、解析符号地址,从而实现库的共享、模块化更新和插件化架构。这一机制在苹果生态中由dyld(Dynamic Link Editor)具体实现,为应用节省内存、支持热更新提供了基础。在工程实践中,开发者常面临动态库加载失败、启动性能优化等挑战,例如处理@rpath搜索路径、管理符号冲突。理解dyld的工作流程——包括递归依赖加载、符号绑定与初始化器执行——对于解决“Library

weixin_30416871的博客 314

iOS 14的新功能:App Attest

When jailbreaking of iOS devices first became popular, it was common for iOS developers to try to defend their apps from users that altered their devices to enable piracy. There were many ways of doin...

weixin_26718993的博客 2026

Xcode 26.3深度解析与开发效率提升指南

集成开发环境(IDE)作为软件开发的核心工具,其设计理念直接影响开发效率与质量。Xcode作为Apple生态的官方IDE,通过深度整合代码编辑、界面设计、测试调试等工具链,实现了跨平台开发工具难以比拟的生态优势。最新26.3版本在SwiftUI实时预览、性能分析工具链等方面有显著提升,特别是Instruments工具链的深度集成,为移动应用性能优化提供了专业解决方案。对于iOS/macOS开发者而言,掌握Xcode的证书配置、多平台代码共享等核心功能,能够有效避免常见开发陷阱,提升持续集成效率。本文以Xco

weixin_34377919的博客 362

FCKeditor 2.6.4 php版本任意文件上传——漏洞复现

一、漏洞描述 FCKeditor是目前最优秀的可见即可得网页编辑器之一,它采用JavaScript编写。具备功能强大、配置容易、跨浏览器、支持多种编程语言、开源等特点。它非常流行,互联网上很容易找到相关技术文档,国内许多Web项目和大型网站均采用了FCKeditor。 Fckeditor 低于 2.6.4 php 版本任意文件上传漏洞,当您的PHP环境配置为 GPC = Off 时可绕过currentfolder参数过滤上传脚本木马控制网站服务器 二、漏洞原理 漏洞版本:<=2.6.4 三、环境搭建

W小哥 1万+

FeignClient注入错误,IDemoClient that could not be found.

注解通常用于 Spring Boot 应用程序的启动类上,以启用 Feign 客户端的自动配置。: 一个类数组,指定Feign客户端接口的类。: 指定Feign客户端接口所在的包路径。: 指定Feign客户端的默认配置类。这个配置类可以提供Feign客户端的全局配置。: 通过类来指定Feign客户端接口所在的包路径。这些类必须位于你想要扫描的包中。是一个声明式的 Web 服务客户端,它使得编写 Web 服务客户端变得更加简单。: 指定要扫描的包路径,用于查找使用 @FeignClient 注解的接口。

一个写了10年bug的程序员日常笔记。 2097

RAGFlow源码解析-2、从源码构架ragflow v0.25.0镜像

本文详细记录了从零开始构建自定义RAGFlow镜像lt/ragflow:0.25.0的全过程。首先介绍了环境准备,包括检查Node.js、Docker版本和项目结构。然后详细说明了构建步骤:编译前端、创建自定义Dockerfile、构建镜像和验证。接着讲解了docker-compose配置修改要点,包括网络定义、MySQL依赖处理等。最后总结了部署过程中遇到的五个关键问题及解决方案,包括networks未定义、MySQL服务依赖、tiktoken文件缺失、数据库配置错误和端口映射问题。通过完整的操作流程和问

liutao841204的专栏 364

【iOS开发】打开另一个APP(URL Scheme与openURL)

【iOS开发】打开另一个APP(URL Scheme与openURL) 目标 平常我们做iOS开发,会经常遇到打开其他的APP的功能。本篇文章讲的就是打开别人的APP的一些知识。我们的目标是: 打开别人的APP让别人打开我们的APPiOS9的适配问题使用URL Schemes传递数据 准备工作 建立一个名为OpenApp的工作空间,用来存放我们的两个工

凉凉gg的博客 2908

OpenClaw 核心命令深度解析:/think high、/reasoning on、/verbose on 功能与实战指南

本文深入解析OpenClaw框架的三大核心命令:/think high实现极限深度推理,突破常规思考瓶颈;/reasoning on提供透明化推理过程,增强决策可信度;/verbose on控制详细输出级别。文章从技术架构、实现原理、配置方法和典型场景四个维度,详细阐述了各命令的功能特性与实战应用,包括法律分析、代码调试和商业决策等复杂场景的最佳实践。同时提供了多级配置方案和资源消耗参考,帮助用户根据任务复杂度灵活调配AI资源,实现效率与深度的最优平衡。

qq_43344878的博客 947

LAN8720芯片硬件设计避坑指南:从晶振选择到PHY地址配置的5个关键细节

本文深入解析LAN8720以太网PHY芯片硬件设计的五个关键细节,涵盖晶振模式选择、PHY地址配置、复位电路设计、电源滤波与接口布线。重点阐述了REF_CLK Out与REF_CLK In两种时钟模式的配置逻辑与应用场景,提供了避免通信失败与信号完整性问题的实战方案,是嵌入式网络硬件开发的实用避坑指南。

i1j2k的博客 516

你可能被openURL给坑了

今天使用第三方的时候出现了bug,最后发现是UIApplication openURL的问题。 现象描述:当连接xcode运行项目时,app界面会卡住一会,然后才有响应;当断开xcode时,app界面会卡住一会,然后闪退。 崩溃日志: Exception Type: EXC_CRASH (SIGKILL) Exception Codes: 0x0000000000000000, 0x000...

jianghui12138的博客 4932

C++/WinRT入门指南:现代Windows原生开发的核心技术

Windows运行时(WinRT)是微软为现代Windows应用开发设计的一套跨语言API框架,它基于COM技术原理构建,提供了统一的二进制接口标准。这项技术的核心价值在于让开发者能够以原生性能调用系统级功能,同时保持跨语言兼容性。在工程实践中,C++/WinRT作为官方推荐的C++语言投影,通过标准C++语法封装WinRT API,显著降低了开发复杂度。特别是在异步编程场景中,结合C++20协程特性,能够大幅提升代码可读性和维护性。对于需要高性能图形处理、系统集成或跨平台兼容的桌面应用开发,掌握C++/W

weixin_33910191的博客 1198

UIKIt学习笔记—App and Environment部分(一)

这两天面了牛客网,加上期末考试,所以没有更新,成功拿到offer啦!之后会继续每日更新的! 牛客网的面经在这 今天2021年12月24日,各位平安夜快乐 这一部分是目录Responding to the Launch of Your AppUIApplicationAbout the UI Preservation ProcessAbout the UI Restoration ProcessRecreate Your View Controllers Responding to the Launch of

Programmer_Roy的博客 968

Vue2 - 详细实现接入使用海康威视监控云端显示及控制功能,网站集成安装海康监控及实时监控显示、回放、放大缩小画面、视频画面截图、截屏抓拍、摄像头控制,实时推流及播放器解决延迟卡顿等问题(详细代码)

vue2,nuxt2,海康威视,海康监控,摄像头监控,vue对接海康处理接口认证规则,监控实时预览和回放功能,海康api接口,安全认证,海康开放平台,官方文档,播放海康摄像头的监控视频,海康实时监控播放详细步骤,web,黑屏,特别卡不流畅怎么办,解决无法推流,录像,连接不上,vue,海康,vue海康视频监控,海康开放平台,实时监控画面,海康插件,视频播放,回放,视频流地址,取流协议,视频sdk播放,hik,rtsp,rtmp,hls,ws,网站,网页,h5页面,后台管理系统,vue2对接海康监控设备,无法连

🏆 前端领域优质创作者 8248

Sigrity Power SI Model Extraction模式如何提取电源网络的S参数和阻抗操作指导(一)

34. 默认格式是BNP format格式,会被Sigrity识别的S参数文件,在仿真完成后,默认会在文件夹中生成bnp和ckt(MCP)文件,无需这步操作。由于port设置的ref Z是50ohm,实际上电源网络的阻抗是没有这么高的,所以S参数回损曲线是基本上全反射的一个状态。Sigrity PowerSI是频域电磁场仿真工具,以下图为例介绍如果用它观测电源的网络的S参数以及阻抗的频域曲线.42. Spice格式的加载进来图标是橙色的,BNP格式的图标是灰色的。

weixin_54787054的博客 1283

UIKIt学习笔记—App and Environment部分(三)

太难了,我的实习不知道还能不能去啊,我想回北京555~ 今天是2021年12月30号 今天主要讲目录引言Preparing Your UI to Run in the ForegroundPreparing Your UI to Run in the Background 引言 UIKit用UIWindowScene对象管理每个app的UI的实例,窗口包含了显示UI实例的window和VC,每个窗口都有一个相关的UIWindowSceneDelegate对象,用来协调app数据和UIKit的交互,所有窗口并

Programmer_Roy的博客 1481

Windows Server 安装 AD 域服务一直失败?一招搞定“请求添加或删除指定服务器上的功能失败”

这个问题看似简单,其实暗藏了几个“隐藏门槛”,像是服务未开启、端口未开放、网卡组件未勾选、虚拟机 SID 冲突等等,尤其在云上装 AD 更容易踩坑。建议每一步都排查一下,尤其是服务和防火墙,很多安装失败其实都是被这两处给卡住了。如果你也遇到 “请求添加或删除指定服务器上的功能失败”,不妨参考这篇文章挨个试试看,说不定就能解决问题!

代码简单说 Vue、JAVA、PHP、Node.js 熟练运用,接口、架构、性能全搞定。 1430

iOS文档--App and Environment(目录大纲)

App and Environment Manage life-cycle events and your app’s UI scenes, and get information about traits and the environment in which your app runs. --app和环境用于管理生命周期事件和app的UI scenes,并获取有关特性和app运...

qq_30185503的博客 253

IMSL CNL 7.0.0 (x86-64)Crack

IMSL CNL 7.0.0 (x86-64)Crack intel的算法库破解文件,这是C++版本的破解文件

VC中sqlite的使用

在VC中对sqlite的使用,实现数据库大批数据的快速插入,读取数据库中的数据在ListCtrl中显示

Flutter与UIKit开发对比指南

跨平台开发框架Flutter采用声明式UI设计,与UIKit的命令式风格形成鲜明对比。在移动应用开发中,UI构建方式直接影响开发效率和性能表现。Flutter通过自绘引擎和Dart语言实现高性能渲染,其"一切皆为Widget"的设计理念提供了极高的灵活性。状态管理是Flutter开发的核心概念,通过setState触发UI更新,与UIKit的视图对象操作方式有本质区别。对于iOS开发者而言,理解Flutter的布局系统、导航机制和性能优化技巧,能够快速实现从UIKit到Flutter的思维转换。本文特别针对

dengkuituo0680的博客 313

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

芒果iOS开发之Xcode8控制台输出警告:subsystem: com.apple.UIKit, category: HIDEventFiltered, enable_level: 0

subsystem: com.apple.UIKit, category: HIDEventFiltered, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 1, privacy_setting: 2, enable_private_data: 0

张茫原 6597

复分析 阿尔福斯(Ahlfors) 第三版答案 英文

答案分为十章,有部分习题没有答案,全英文复分析阿尔福斯(Ahlfors) 第三版答案

2021新版XCode下SwiftUI的App生命周期监控新方案

早期在使用UIKit框架开发App时,我们通过UIDelegate来获得生命周期回调,具体如下: extension AppDelegate: UIApplicationDelegate { func applicationDidBecomeActive(_ application: UIApplication) { // code here } } 后来换用SwiftUI框架,我们通过SceneDelegate回调来处理生命周期逻辑: class SceneDelegat

madaxin的博客 675

30 Days of SwiftUI:终极SwiftUI学习指南与完整项目实战

30 Days of SwiftUI是一个通过每日实战项目帮助开发者快速掌握SwiftUI的完整学习计划。该项目包含14个精心设计的SwiftUI应用实例,从基础动画到复杂交互,覆盖SwiftUI核心功能与最佳实践,是初学者和进阶开发者的理想学习资源。 ## 为什么选择30 Days of SwiftUI? SwiftUI作为Apple推出的现代UI框架,以其声明式语法和跨平台特性成为iOS开

gitblog_00384的博客 404

ios音频硬编码和软编码_停止在iOS应用中对颜色进行硬编码

ios音频硬编码和软编码Difficulty: Beginner | Easy | Normal | Challenging<br/> 难度:初学者| 容易| 普通 | 具有挑战性的<br/> This article has been developed using Xcode 11.4.1, and Swift 5.2.2 本文是使用Xcode 11.4.1和Swif...

weixin_26745865的博客 373

JavaScript for 循环中的 `i++` 与 `++i`:为什么二者输出相同值

`for` 循环是 JavaScript 中最常用的循环结构,而 `i++`(后缀自增)与 `++i`(前缀自增)是循环步进里最常见的两种写法。本文以 JavaScript 教程仓库中 [Which values get shown by the "for" loop?](https://link.gitcode.com/i/1f2b58a5469dee98b7656d335edb52bb) 这一

gitblog_00838的博客 332

如何用 LibreHardwareMonitor 盯住整机温度与风扇:从首次运行到远程查看的完整指南

LibreHardwareMonitor 是一款免费、开源的硬件监控软件,能读取你电脑的温度传感器、风扇转速、电压、负载和频率等数据。它不捆绑任何后台,不推送广告,所有数据都来自你本机。本文按"第一次启动 → 看懂界面 → 记录与远程查看"的顺序,把新手最容易卡住的几处讲清楚,帮你把它跑起来并真正用起来。 ## 一、第一次启动:先装驱动,再打开界面 🖥️ LibreHardwareMonit

gitblog_01130的博客 390
上一篇: UIKIt学习笔记—App and Environment部分(一)
下一篇: UIKIt学习笔记—App and Environment部分(三)
诚是张嘉诚
博客等级 码龄7年 15粉丝 24原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值