首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏学海无涯

    iOS26适配指南之UIScene Open File

    在 iOS 26 之后,通过 UIScene 的 open(_:options:completionHandler:) 方法,可以非常方便地实现这一功能。 前提 文件位于可访问的共享沙盒目录。

    69310编辑于 2025-09-23
  • 来自专栏学海无涯

    iOS开发之仿支付宝后台隐藏信息

    func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions UIWindowScene) else { return } } func sceneWillEnterForeground(_ scene: UIScene) { // 隐藏 hidePrivacyWindow() } func sceneDidEnterBackground(_ scene: UIScene) { // 显示

    29710编辑于 2024-12-11
  • 来自专栏大话swift

    iPadOS上启动黑屏翻车问题分析(二)

    configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions LoginViewController.h" @interface SceneDelegate() @end @implementation SceneDelegate -(void)scene:(UIScene self.window]; } @end 上篇文章我们分析到UIWindow的继承关系发生了变化需要通过Scene来进行初化,而Scene变化为称为Respender的子类可以响应事件而不再是之前那个单纯的UIScene func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions

    2.3K10发布于 2019-10-14
  • 来自专栏正则

    iOS13 Scene Delegate

    func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions (_ scene: UIScene) { } func sceneWillResignActive(_ scene: UIScene) { } func sceneWillEnterForeground (_ scene: UIScene) { } func sceneDidEnterBackground(_ scene: UIScene) { } } scene(_:willConnectTo func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions

    7.7K21发布于 2021-11-04
  • 来自专栏学海无涯

    iOS开发之Xcode11后纯代码项目工程设置

    完成启动后,控制权被交接给 SceneDelegate,它的 scene(_:willConnectTo:options:)将会被调用,设置window的根视图控制器 func scene(_ scene: UIScene , willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions

    2.2K10发布于 2019-12-26
  • 来自专栏学海无涯

    iOS开发之仿支付宝后台隐藏信息

    func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions UIWindowScene) else { return } } func sceneWillEnterForeground(_ scene: UIScene) { / / 隐藏 hidePrivacyWindow() } func sceneDidEnterBackground(_ scene: UIScene) {

    28910编辑于 2025-02-10
  • 来自专栏学海无涯

    iOS14开发-入门知识

    func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions UIWindowScene) else { return } } func sceneDidDisconnect(_ scene: UIScene) { } func sceneDidBecomeActive(_ scene: UIScene) { } func sceneWillResignActive(_ scene: UIScene) { } func sceneWillEnterForeground(_ scene: UIScene) { } func sceneDidEnterBackground(_ scene : UIScene) { } } 初始化 Main Storyboard 解析 Info.plist 获得Application Scene Manifest,找到Main Storyboard

    4.2K40发布于 2021-01-18
  • 来自专栏PDF 开发

    如何使用 Swift 开发 iOS PDF 查看器或编辑器

    func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions UIWindowScene) else { return } } func sceneDidDisconnect(_ scene: UIScene) { // Called as paused (or not yet started) when the scene was inactive. } func sceneWillResignActive(_ scene: UIScene temporary interruptions (ex. an incoming phone call). } func sceneWillEnterForeground(_ scene: UIScene to undo the changes made on entering the background. } func sceneDidEnterBackground(_ scene: UIScene

    2.3K00编辑于 2024-05-23
  • 来自专栏iOS开发~

    iOS_适配 iOS16 转屏

    viewController.navigationController setNeedsUpdateOfSupportedInterfaceOrientations]; // find scene NSArray<UIScene *> *scenes = [[[UIApplication sharedApplication] connectedScenes] allObjects]; __block UIScene *firstScene = scenes.firstObject; [scenes enumerateObjectsUsingBlock:^(UIScene * _Nonnull obj

    1.7K10编辑于 2023-10-18
  • 来自专栏大话swift

    Hello, SwiftUI

    static变量,从而我们可以臆断这个就是渲染的主要地方和实现 接下来我们看看怎么在开发中使用 在使用之前我们会发现多了个类 SceneDelegate func scene(_ scene: UIScene , willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions

    1.7K20发布于 2019-07-04
  • 来自专栏学海无涯

    iOS开发之App互跳

    func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) { if let url = URL func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) { if let url = URLContexts.first

    27510编辑于 2024-10-23
  • 来自专栏学海无涯

    iOS开发之App互跳

    func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) { if let url = URL func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) { if let url = URLContexts.first

    21710编辑于 2025-02-10
  • 来自专栏娱乐心理测试

    xcode11新增SceneDelegate文件

    application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 转交给SceneDelegate.m: - (void)scene:(UIScene willConnectToSession:(UISceneSession *)session options:(UISceneConnectionOptions *)connectionOptions - (void)scene:(UIScene

    2.2K21发布于 2019-12-11
  • 来自专栏学海无涯

    iOS18适配指南之UITabBarController

    func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { guard let windowScene = (scene as?

    2.5K11编辑于 2024-09-17
  • 来自专栏学海无涯

    iOS18适配指南之UITabBarController

    func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { guard let windowScene = (scene as?

    76310编辑于 2025-02-10
  • 来自专栏技术博客文章

    删除SceneDelegate

    SceneDelegate.h/.m文件 2.在AppDelegate.h添加@property (strong, nonatomic) UIWindow * window;属性 3.在AppDelegate.m文件中移除UIScene

    92220编辑于 2021-12-06
  • 来自专栏学海无涯

    Xcode26新特性与iOS26适配指南

    所有 App 必须使用 UIScene 生命周期,不再允许只使用 AppDelegate。 UIKit 支持显示 HDR(高动态范围)颜色 ,而不仅仅是 HDR 图像。 通过改进的 UIScene 的open()方法,可以将不受支持的类型文件交给其他 App 打开。

    3K11编辑于 2025-09-16
  • 来自专栏学海无涯

    Xcode26新特性与iOS26适配指南

    所有 App 必须使用 UIScene 生命周期,不再允许只使用 AppDelegate。 UIKit 支持显示 HDR(高动态范围)颜色 ,而不仅仅是 HDR 图像。 通过改进的 UIScene 的open()方法,可以将不受支持的类型文件交给其他 App 打开。 注:以上内容基于 Xcode 26 Beta,新特性均通过测试,详细内容会以专题文章的形式陆续展示。

    9K61编辑于 2025-09-16
  • 来自专栏iOS开发~

    iOS_从其他App获取文件、分享文件给其他App

    bin文件的分享列表里看到自己的app了,如图: 第二步:获取文件 当从其他app分享文件过来时,会调用: // MARK: - 其他app分享过来时回调 func scene(_ scene: UIScene

    2.6K10编辑于 2022-07-20
  • 来自专栏iOS底层原理

    iOS-如何创建一个新的App基础框架

    并且分别创建Main ViewController View Model 截屏2021-09-24 下午2.12.56.png 三·实现Screen的Delegate方法 - (void)scene:(UIScene

    1.6K20发布于 2021-09-24
领券