Explore the various UI frameworks available for building app interfaces. Discuss the use cases for different frameworks, share best practices, and get help with specific framework-related questions.

All subtopics
Posts under UI Frameworks topic

Post

Replies

Boosts

Views

Created

Flutter iOS - EXC_BAD_ACCESS crash on cold start after app was killed, affects ~1-2% of users
Question: How to prevent Flutter app crash on iOS 18 during cold start when iOS traverses view hierarchy before Flutter engine is fully initialized? Help needed: Looking for a way to either delay iOS view hierarchy traversal or ensure Flutter is fully initialized before iOS lifecycle callbacks fire. Problem Summary Our Flutter app crashes on cold start for approximately 1-2% of iOS users. The crash occurs specifically on iOS and only under these exact conditions: When crash happens: User opens app and uses it normally ✅ User minimizes app (goes to background) ✅ User returns to app from background ✅ (works fine) User kills app from app switcher (swipe up to close) User taps app icon to launch again → CRASH ❌ Key observations: Crash is intermittent - app may open on 2nd, 3rd, or 5th attempt 100% reproducible on affected devices by repeating kill→launch cycle ~98% of users have no issues Environment Flutter: 3.38.3 Crash Logs (from Sentry) Crash Type 1: Stack Overflow (most common) OS Version: iOS 18.7.2 (22H124) Exception Type: EXC_BAD_ACCESS (SIGBUS) Exception Codes: BUS_NOOP at 0x000000016ad5be90 Application Specific Information: compare:options:range:locale: > Stack overflow in (null) Thread 0 Crashed: 0 CoreFoundation CFStringGetLength 1 CoreFoundation CFStringCompareWithOptionsAndLocale 2 CoreFoundation 3 libsystem_c bsearch 4 CoreFoundation 5 UIKitCore ... 15-99: UIKitCore 0x30e177148 [inlined] // 85+ recursive calls Crash Type 2: Use-After-Free Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: SEGV_NOOP at 0x0500007f14000000 KERN_INVALID_ADDRESS at 0x500007f14000000 Thread 0 Crashed: 0 libobjc.A.dylib objc_retainAutoreleaseReturnValue 1 UIKitCore ... 6 libobjc.A.dylib objcrootDealloc 7 QuartzCore // CALayer operations What We Tried (nothing solved cold start crash) Attempt Result Increased stack size to 64MB (-Wl,-stack_size,0x4000000) ❌ No effect Disabled iOS State Restoration ❌ No effect Added isViewLoaded checks in AppDelegate ❌ No effect Added try-catch around GetStorage/SecureStorage init ❌ No effect Added isAppActive flag to track app state ❌ No effect Snapshot overlay in applicationWillResignActive ✅ Fixed background→foreground crash, ❌ but NOT cold start Current AppDelegate.swift import UIKit import Flutter @main @objc class AppDelegate: FlutterAppDelegate { private var snapshotView: UIView? private var isAppActive = false override func application( _ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { GeneratedPluginRegistrant.register(with: self) window?.overrideUserInterfaceStyle = .light isAppActive = true return super.application(application, didFinishLaunchingWithOptions: launchOptions) } override func application(_ application: UIApplication, shouldSaveSecureApplicationState coder: NSCoder) -> Bool { return false } override func application(_ application: UIApplication, shouldRestoreSecureApplicationState coder: NSCoder) -> Bool { return false } override func applicationWillResignActive(_ application: UIApplication) { guard isAppActive, let window = self.window, let rootVC = window.rootViewController, rootVC.isViewLoaded, snapshotView == nil else { return } let snapshot = UIView(frame: window.bounds) snapshot.backgroundColor = .white snapshot.tag = 999 window.addSubview(snapshot) snapshotView = snapshot } override func applicationDidBecomeActive(_ application: UIApplication) { guard snapshotView != nil else { isAppActive = true return } snapshotView?.removeFromSuperview() snapshotView = nil } }
Topic: UI Frameworks SubTopic: UIKit
1
0
86
1w
Flutter iOS crash on cold start - EXC_BAD_ACCESS Stack overflow in UIKit view hierarchy
I'm experiencing intermittent crashes on iOS when launching a Flutter app after it was killed from the app switcher. The app works fine when resumed from background. Environment: Flutter 3.38.3 Crash signature: EXC_BAD_ACCESS (SIGBUS) Stack overflow in (null) compare:options:range:locale: > Thread 0: CFStringGetLength → CFStringCompareWithOptionsAndLocale → UIKitCore ( 85+ inlined recursive calls) What I've tried: Increased stack size to 64MB (-Wl,-stack_size,0x4000000) - didn't help Disabled iOS State Restoration - didn't help Added snapshot overlay in applicationWillResignActive - helped for background issue, but not cold start Key observation: The crash happens intermittently. Sometimes the app opens on 2nd attempt, sometimes on 5th. This suggests a race condition between Flutter engine initialization and iOS view hierarchy traversal. Question: Is there a way to delay iOS view hierarchy operations until Flutter is fully initialized? Any help appreciated!
Topic: UI Frameworks SubTopic: UIKit
1
0
90
1w
[Xcode 26.2] Weird animation of first-level view controller being pushed on iOS 26 (with hidesBottomBarWhenPushed)
Hi. We discovered this strange behaviour when we're planning to migrate to Xcode 26.2 RC. When our app is running on iOS 26, view controllers thar are pushed from the root of UITabBarController will show with an animation. The views are growing from either the top-left or bottom-right corner. This only happens when the hidesBottomBarWhenPushed variable is set to true. Also it only happens to view controllers that are pushed directly from a UITabBarController; subsequent view controllers that are pushed will not have this weird animation. Since our app design requires hidesBottomBarWhenPushed to be true, we are asking if there is any way to fix this animation. Please refer to the following gif: We have tried methods described in this article but it doesn't work all the time: https://darjeelingsteve.com/articles/Fixing-UINavigationController-Push-Animation-Layout-Issues-on-iOS-26.html. We've tried the following three methods: This does not work at all. First-level view controllers are still showing with animation. override func pushViewController(_ viewController: UIViewController, animated: Bool) { super.pushViewController(viewController, animated: animated) transitionCoordinator?.animate { _ in UIView.performWithoutAnimation { viewController.view.layoutIfNeeded() } } } This does not work as well. override func pushViewController(_ viewController: UIViewController, animated: Bool) { super.pushViewController(viewController, animated: animated) transitionCoordinator?.animate(alongsideTransition: { [weak self] _ in UIView.performWithoutAnimation { self?.navigationBar.layoutIfNeeded() } }, completion: nil) } This works sometimes. However it breaks the push animation for some view controllers. override func pushViewController(_ viewController: UIViewController, animated: Bool) { super.pushViewController(viewController, animated: animated) UIView.performWithoutAnimation { viewController.view.layoutIfNeeded() } } We've created a simple sample project that reproduces this problem. Please run it on a simulator running iOS 26. https://drive.google.com/file/d/1q3pokphh1YDINH69LrHuqJQe8MijHQ2m/view?usp=sharing If anyone has a solution to this please let me know. Thank you for reading.
Topic: UI Frameworks SubTopic: UIKit
0
1
90
1w
SwiftUI - presentationDetents behaves incorrectly on iOS 16–18 but works correctly on iOS 26
I'm using a custom modifier called AutoSheetDetentModifier to automatically size a sheet based on its content. On iOS 26, it works as expected: the content height is measured correctly and the sheet shrinks to match that height. However, on iOS 16, 17 and 18, the same code doesn’t work. The content height is still measured, but the sheet does not reduce its height. Instead, the sheet remains larger and the content appears vertically centered. (Note that content() includes ScrollView) public struct AutoSheetDetentModifier: ViewModifier { @State private var height: CGFloat = 380 // default value to avoid bouncing public func body(content: Content) -> some View { content .modifier(MeasureHeightViewModifier(height: $height)) .presentationDetents([.height(height)]) } } public struct MeasureHeightViewModifier: ViewModifier { @Binding var height: CGFloat public func body(content: Content) -> some View { content .fixedSize(horizontal: false, vertical: true) .background( GeometryReader { geo -> Color in DispatchQueue.main.async { height = geo.size.height } return Color.clear } ) } } extension View { public func applyAutoSheetDetent() -> some View { self .modifier(AutoSheetDetentModifier()) } } public var body: some View { VStack { header() content() // includes ScrollView footer() } .background(Color.customGray) .applyAutoSheetDetent() } func content() -> some View { ScrollView { VStack { ForEach(items) { item in itemRow(item) } } } .frame(maxHeight: UIScreen.main.bounds.height * 0.7) } Screenshot from iOS 26 (working as expected): Screenshot from iOS 18 (not working): How can I make .presentationDetents(.height) shrink the sheet correctly on iOS 16–18, the same way it does on iOS 26?
1
0
122
1w
Liquid Glass TabBar animations causes Hangs, bug with UIKitCore?
With iOS 26.1 we started seeing a bug that only appears on iPhone Air. This bug is visible with simulators too. I have tried so many different ways to fix the issue, but Instruments Profiler is pointing at UIKitCore. We load a tab bar, when the user attempts to switch a tab, the app hangs and never recovers. It happens right as the animation of the Glass bubble is in progress. I have tried a UIKit Tab bar, a SwiftUI Tab bar. I tore out AppDelegate and did a direct @main SwiftUI entry for my application. This issue appears with every tab bar instance I try. I attempted to disable LiquidGlass by utilizing this flag UIDesignRequiresCompatibility in my plist, but the flag seems to be ignored by the system. I am not sure what else to try. I have a trace file if that is helpful. What else can I upload? Here is what the code looks like. struct ContentView: View { @State private var selectedTab = 2 var body: some View { TabView(selection: $selectedTab) { Text("Profile") .tabItem { Label("Me", systemImage: "person") } .tag(0) Text("Training") .tabItem { Label("Training", systemImage: "calendar") } .tag(1) Text("Home") .tabItem { Label("Home", systemImage: "house") } .tag(2) Text("Goals") .tabItem { Label("Goals", systemImage: "target") } .tag(3) Text("Coach") .tabItem { Label("Coach", systemImage: "person.2") } .tag(4) } } } #Preview { ContentView() } and AppView entry point import SwiftUI @main struct RunCoachApp: App { var body: some Scene { WindowGroup { ContentView() } } }
6
1
351
1w
setAlternateIconName Issue on iOS 26.1 — Primary Icon Not Restoring and API Freezes After Invalid Name
Hi, I found an issue related to dynamic app icon changes using UIApplication.shared.setAlternateIconName specifically on iOS 26.1. Test Scenario 1. Change icon using: UIApplication.shared.setAlternateIconName("TestIcon") → Works correctly. 2. Revert to primary icon using: UIApplication.shared.setAlternateIconName(nil) Issue on iOS 26.1 For some users, the device does not revert back to the primary icon when calling setAlternateIconName(nil). To handle this case, we attempted to force the primary icon by explicitly calling: UIApplication.shared.setAlternateIconName("AppIcon") However, on iOS 26.1: • As soon as this call is made, the entire setAlternateIconName API stops working. • Every subsequent call to setAlternateIconName fails. • The API begins returning errors (e.g. NSPOSIXErrorDomain code 35). • The issue persists until the device is rebooted. Expected Behavior We understand that providing "AppIcon" should not change the icon (since primary icon is restored using nil), but on earlier versions of iOS (≤ 26.0): • Calling "AppIcon" simply does nothing (no icon change) • And setAlternateIconName(nil) works as expected to restore the default icon. Problem Summary • On iOS 26.1, calling setAlternateIconName("AppIcon") puts the icon system into a bad state. • After this call: • The API becomes unresponsive • All icon changes fail • Only a reboot restores normal behavior • This regression does not occur on iOS 26.0 or earlier. Request Is this a known issue with the app icon system on iOS 26.1? Should "AppIcon" explicitly be rejected, or is the freeze/error state unintended behavior? Any guidance or confirmation would be greatly appreciated. Thanks!
Topic: UI Frameworks SubTopic: UIKit
0
0
115
1w
SwiftUI sheet with TextField using autocorrectionDisabled() prevents view model deinit after editing
I present a view as a sheet that contains a TextField and a viewModel. The sheet uses .autocorrectionDisabled() on the TextField. If I open the sheet and dismiss it without editing, the viewModel is released as expected. But if I edit the TextField and then dismiss the sheet, the viewModel is not deinitialized (it remains retained). Test Outputs: // # Present 1st time - Correct ✅ TestViewModel - init - 0x0000600000c12ee0 // Dismiss wihtout editing, deinitialized correctly TestViewModel - deinit - 0x0000600000c12ee0 // # Present 2st time - Incorrect ❌ TestViewModel - init - 0x0000600000c006c0 // Edit and dismiss, no deinit here // # Present 3rd time - Incorrect ❌ TestViewModel - init - 0x0000600000c113b0 // Enter text field to edit will deinit previous one TestViewModel - deinit - 0x0000600000c006c0 // Dismiss, no deinit // TestViewModel (0x0000600000c113b0) remains retained ⚠️ Using .autocorrectionDisabled(true) gives the same problem. Removing or commenting out .autocorrectionDisabled() fixes the issue, but I don't want autocorrection enabled. Is this a known SwiftUI bug? Has anyone encountered it and found a workaround? Sample code: @main struct TestApp: App { @State private var isPresentingSheet: Bool = false var body: some Scene { WindowGroup { VStack { Button("Present Sheet") { self.isPresentingSheet = true } } .sheet(isPresented: $isPresentingSheet) { TestTextInputView() } } } } View (check the HERE line): struct TestTextInputView: View { @StateObject private var viewModel = TestTextInputViewModel() @FocusState private var isFocused: Bool @Environment(\.dismiss) private var dismiss var body: some View { NavigationStack { Form { TextField("Name", text: $viewModel.name) .autocorrectionDisabled() // HERE: Comment it out will work without any issue. .focused($isFocused) .submitLabel(.done) .onSubmit { self.isFocused = false } } .toolbar { ToolbarItem(placement: .topBarLeading) { Button("Cancel") { dismiss() } } } } } } View Model: final class TestTextInputViewModel: ObservableObject { @Published var name: String = "" deinit { print("TestViewModel - deinit - \(Unmanaged.passUnretained(self).toOpaque())") } init() { print("TestViewModel - init - \(Unmanaged.passUnretained(self).toOpaque())") } }
Topic: UI Frameworks SubTopic: SwiftUI
1
0
155
1w
What poi in .mapStyle included mountain peaks?
Hello developers, atm im developing a small app focused on hiking. A core pice of the app is a Map() from MapKit. I only want a few points of interest to be visible on the map (e.g. no stores, no clubs etc.). My question now is what modifier includes mountain Peaks? I tried .rockClimbing, .nationalPark, .landmark, .skiing & .hiking. However none of them makes mountain Peaks visible on the map. The complete code would be: Map() .mapStyle(.standard(pointsOfInterest: .including([.rockClimbing, .nationalPark, .landmark, .skiing, .hiking])))
1
0
232
1w
NSBox Basically Not Visible At All on macOS Tahoe in Light Mode?
I noticed that I cannot even tell that an NSBox is being used on macOS Tahoe when the system is in light mode. The 'box' background can't be seen so it makes it appear that the subviews in the box aren't positioned correctly (because they are inset from the subview outside the box). There is no visual indicator that that subviews inside this box are grouped together because well, you can't see the box at all. In Interface Builder the box looks fine at Design Time in "Light Mode". In Dark Mode the box looks fine at design time and at run time. Just figured I'd throw that out there.
Topic: UI Frameworks SubTopic: AppKit Tags:
2
0
162
1w
Locking App Orientation to Landscape in Playground
Hello! I’m building my Swift Student Challenge project in Swift Playgrounds, and I’ve run into an issue with app orientation. Since this is a game, the layout and interactions only work correctly in landscape, but Playgrounds doesn’t offer the usual orientation settings you’d configure in Xcode. Is there a recommended way to force a landscape-only experience in Swift Playgrounds using SwiftUI? Any workarounds or guidance would be greatly appreciated! Thank you!
0
0
47
1w
NSButtons disappear on macOS 26
I have attached 2 images of our Mac Apps user interface. The app is built for macOS 15.6 or newer. On macOS 15 and earlier everything looks fine. But the same App running on macOS 26 the controls disappear. We were able to temporarily resolve the problem by adding UIDesignRequiresCompatibility to the info.plist. This type of nonsense happens all over the app without the compatibility switch. Shouldn't all these legacy controls be backward compatible on Glass? This part of the app where the controls are disappearing is built in Swift (not swift ui) and uses standard programatic layout and visual constraints. On macOS 26, there are no Xcode warnings or layout errors on the console relative to the layout so we are confused as to how we would resolve this without the use of UIDesignRequiresCompatibility. Is this some kind of bug in NSControl glass compatibility? We are not likely to move the entire app into SwiftUI anytime soon. How would we resolve this?
4
0
314
1w
How to present a view in SwiftUI on the top of any other view, even if there is already a view presented
I have a SwiftUI app that needs to present a fullScreenCover when the user opens a deep link. This screen must appear above anything currently shown — even if another fullScreenCover is already being presented. In UIKit, I can achieve this by walking the view controller hierarchy, finding the top-most view controller, and presenting the new full-screen view from there. What is the recommended way to reproduce this behavior in SwiftUI? How can I ensure a fullScreenCover is always shown above the current presentation layer, regardless of the app’s UI state?
Topic: UI Frameworks SubTopic: SwiftUI
0
0
74
1w
Xcode26+iOS26系统,UICollectionView的reloadData不会触发调用UICollectionViewCell的layoutSubviews方法。
问题场景: Xcode26+iOS26系统,UICollectionView的reloadData不会触发调用UICollectionViewCell的layoutSubviews方法。 正常场景: Xcode26+iOS18及以下系统,UICollectionView的reloadData能够触发调用UICollectionViewCell的layoutSubviews方法。 UITableView的reloadData,会正常调用UITableViewCell的layoutSubviews方法。
Topic: UI Frameworks SubTopic: UIKit Tags:
0
0
45
1w
Push to start live activities with channelIds do not work for a second time without re-installing the app.
We have implemented live activities with broadcast notification using channels. It has been working without a problem for the last 6-8 months. Now we want to upgrade it by starting the channel based live activity via push notification. Whenever I try locally with development channels there isnt any problem regarding to starting live activity. When we go production on Testflight or App Store it doesn't work after first successful push even though user enters the app and send the new push to start token to our server and we are using the latest token we receive. We couldn't go further with debugging since it works perfectly fine the client when tried locally and we know we can send successful pushes as well since the metrics shows 12% success but we do not actually know what happened to remaining 88%. Every apns request return success with 200 and empty body. How can we further debug this issue. Or is this a common problem, if so, is there any possible solution to this. As far as we see, token goes to our server so we have the latest token all the time and this whole logic doesn't work without deleting and reinstalling the app.
1
0
102
1w
NSSheetMoveHelper Sends Parent Windows Flying If Sheet Window Frame is Resized on macOS Tahoe
So I noticed this: A sheet window is presented. The sheet window has some UI that makes it expandable say a little arrow expandable button. Click the little expandable button. Now the sheet window controller calls - (void)setFrame:display:animate: on its window to resize. The parent window flies across the screen to the lower left corner. I'm on Tahoe 26.1. Seems to be related to NSSheetMoveHelper. Not sure how long this bug has been around. Workaround is to call -setFrame:display:animate: and pass NO to the animate flag. Then the sheet window resizes (but not animated which doesn't look as good as the old behavior but better than suddenly disappearing). I think Apple may already knows about this bug b/c in an Apple app on Tahoe I see a sheet resizing being done with no animation...
Topic: UI Frameworks SubTopic: AppKit Tags:
1
0
46
2w
Can SwiftUI Views serve as delegates?
Structs are value types, and the SwiftUI gets reinitialized many times throughout its lifecycle. Whenever it gets reinitialized, would the reference that the delegator has of it still work if the View uses @State or @StateObject that hold a persistent reference to the views data? protocol MyDelegate: AnyObject { func didDoSomething() } class Delegator { weak var delegate: MyDelegate? func trigger() { delegate?.didDoSomething() } } struct ContentView: View, MyDelegate { private let delegator = Delegator() @State counter = 1 var body: some View { VStack { Text("\(counter)") Button("Trigger") { delegator.trigger() } } } func didDoSomething() { counter += 1 //would this call update the counter in the view even if the view's instance is copied over to the delegator? } }
0
0
40
2w
UITabBar ignores font in iOS 26.2
Our app has a UITabBar and the compactInlineLayoutAppearance has a custom font set. This worked fine on iOS 26.0 and 26.1. [self.bottomTabBar.standardAppearance.compactInlineLayoutAppearance.normal setTitleTextAttributes: @{ NSFontAttributeName:[UIFont fontWithName:@"AvenirNext-DemiBold" size:18.0] }]; But on iOS 26.2, the system ignores this custom font. How can I apply a custom font to a UITabBar on iOS 26.2?
Topic: UI Frameworks SubTopic: UIKit Tags:
3
0
151
2w
CoreAutoLayout -[NSISEngine _flushPendingRemovals] crash
crash stack: Crashed: com.apple.main-thread 0 libsystem_pthread.dylib 0x90c thread_chkstk_darwin + 60 1 libsystem_pthread.dylib 0x90c ___chkstk_darwin + 60 2 CoreAutoLayout 0x14c4 -[NSISEngine _flushPendingRemovals] + 56 3 CoreAutoLayout 0x2de08 -[NSISEngine _coreReplaceMarker:withMarkerPlusDelta:].cold.1 + 64 4 CoreAutoLayout 0x15d78 -[NSISEngine _coreReplaceMarker:withMarkerPlusDelta:] + 204 5 CoreAutoLayout 0x2ce38 -[NSISEngine constraintDidChangeSuchThatMarker:shouldBeReplacedByMarkerPlusDelta:] + 108 6 CoreAutoLayout 0x15f1c -[NSISEngine tryToChangeConstraintSuchThatMarker:isReplacedByMarkerPlusDelta:undoHandler:] + 100 7 CoreAutoLayout 0x2fdbc -[NSLayoutConstraint _tryToChangeContainerGeometryWithUndoHandler:] + 252 8 CoreAutoLayout 0x3020c -[NSLayoutConstraint _setSymbolicConstant:constant:symbolicConstantMultiplier:] + 452 9 CoreAutoLayout 0x30378 -[NSLayoutConstraint setConstant:] + 84 10 UIKitCore 0x51c3c __74-[UIView(UIConstraintBasedLayout) _autoresizingConstraints_frameDidChange]_block_invoke + 140 11 UIKitCore 0x1841174 -[UIView(AdditionalLayoutSupport) _withUnsatisfiableConstraintsLoggingSuspendedIfEngineDelegateExists:] + 112 12 UIKitCore 0x51b28 -[UIView(UIConstraintBasedLayout) _autoresizingConstraints_frameDidChange] + 452 13 UIKitCore 0x2c894 -[UIView _constraints_frameDidChange] + 100 14 UIKitCore 0x18fac08 -[UIView(Geometry) setFrame:] + 576 15 UIKitCore 0x96712c -[UITabBar setFrame:] + 128 16 UIKitCore 0x1666f4 -[_UITabBarControllerVisualStyle updateTabBarLayout] + 360 17 UIKitCore 0x16671c -[_UITabBarControllerVisualStyle updateTabBarLayout] + 400 18 UIKitCore 0x16671c -[_UITabBarControllerVisualStyle updateTabBarLayout] + 400 19 UIKitCore 0x16671c -[_UITabBarControllerVisualStyle updateTabBarLayout] + 400 20 UIKitCore 0x16671c -[_UITabBarControllerVisualStyle updateTabBarLayout] + 400 21 UIKitCore 0x16671c -[_UITabBarControllerVisualStyle updateTabBarLayout] + 400 22 UIKitCore 0x16671c -[_UITabBarControllerVisualStyle updateTabBarLayout] + 400 23 UIKitCore 0x16671c -[_UITabBarControllerVisualStyle updateTabBarLayout] + 400 24 UIKitCore 0x16671c -[_UITabBarControllerVisualStyle updateTabBarLayout] + 400 25 UIKitCore 0x16671c -[_UITabBarControllerVisualStyle updateTabBarLayout] + 400 26 UIKitCore 0x16671c -[_UITabBarControllerVisualStyle updateTabBarLayout] + 400 27 UIKitCore 0x16642c -[UITabBarController _prepareTabBar] + 128 28 UIKitCore 0x166a10 -[UITabBarController _layoutContainerView] + 376 29 UIKitCore 0x1677a8 -[UITabBarController __viewWillLayoutSubviews] + 28 30 UIKitCore 0x147078 -[UILayoutContainerView layoutSubviews] + 176 31 UIKit 0xb14a0 -[UILayoutContainerViewAccessibility layoutSubviews] + 60 for a more detail crash stack, can see attach file: crash.txt crash probabilistic happed after app enter background, and our app support landscape, when crash appear, the system method: /* This method is called when the view controller's view's size is changed by its parent (i.e. for the root view controller when its window rotates or is resized). If you override this method, you should either call super to propagate the change to children or manually forward the change to children. */ - (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id <UIViewControllerTransitionCoordinator>)coordinator API_AVAILABLE(ios(8.0)); is called; but for a normal not crash case, when enter background and rotate device, the viewWillTransitionToSize method is not called until app enter foreground; Are there any suggestions that can help solve this problem, thank you.
1
0
174
2w