Interaction Design

RSS for tag

Create engaging ways for users to interact with your software.

Posts under Interaction Design tag

40 Posts

Post

Replies

Boosts

Views

Activity

Proposal: Capacitive swipe-based volume control integrated into iPhone frame
I would like to propose a design enhancement for future iPhone models: using the existing bottom-right antenna line (next to the power button area) as a capacitive “volume control zone” that supports swipe gestures. Today this line is a structural antenna break, but it is also located exactly where the thumb naturally rests when holding the phone in one hand. With a small embedded capacitive/force sensor, the user could slide their finger along this zone to control volume without reaching for the physical buttons. Why this makes sense: • Perfect ergonomic thumb position in both portrait and landscape • One-handed volume adjustment becomes easier for large-screen devices • Silent and frictionless vs. clicking buttons (useful in meetings / night mode) • Consistent with Apple’s recent move toward contextual hardware input (Action Button, Capture Button, Vision Pro gestures) The interaction model would be: • Swipe up → increase volume • Swipe down → decrease volume • (Optional) long-press haptic = mute toggle This could also enhance accessibility, especially for users with reduced hand mobility who struggle to press mechanical buttons on tall devices. Technically, this would be similar to the Capture Button (capacitive + pressure layers), but linear instead of pressure-based. It does not replace physical buttons, it complements them as a silent gesture-based alternative. Thank you for considering this as a future interaction refinement for iPhone hardware design.
2
0
740
Oct ’25
Liquid Glass clear variant isn't clear
I've been experimenting with Liquid Glass quite a bit and watched all the WWDC videos. I'm trying to create a glassy segmented picker, like the one used in Camera: however, it seems that no matter what I do there's no way to recreate a truly clear (passthrough) bubble that just warps the light underneath around the edges. Both Glass.regular and Glass.clear seem to add a blur that can not be evaded, which is counter to what clear ought to mean. Here are my results: I've used SwiftUI for my experiment but I went through the UIKit APIs and there doesn't seem to be anything that suggests full transparency. Here is my test SwiftUI code: struct GlassPicker: View { @State private var selected: Int? var body: some View { ScrollView([.horizontal], showsIndicators: false) { HStack(spacing: 0) { ForEach(0..<20) { i in Text("Row \(i)") .id(i) .padding() } } .scrollTargetLayout() } .contentMargins(.horizontal, 161) .scrollTargetBehavior(.viewAligned) .scrollPosition(id: $selected, anchor: .center) .background(.foreground.opacity(0.2)) .clipShape(.capsule) .overlay { DefaultGlassEffectShape() .fill(.clear) // Removes a semi-transparent foreground fill .frame(width: 110, height: 50) .glassEffect(.clear) } } } Is there any way to achieve the above result or does Apple not trust us devs with more granular control over these liquid glass elements?
2
3
243
Aug ’25
Menu view flashes white before closing when device is set to dark appearance
Feedback ID: FB19846667 When dismissing a Menu view when the device is set to dark appearance, there is a flash of lightness that is distracting and feels unnatural. This becomes an issue for apps that rely on the user interacting with Menu views often. When using the overflow menu on a toolbar, the effect of dismissing the menu is a lot more natural and there is less flashing. I expect a similar visual effect when creating Menu views outside of a toolbar. Has anyone found a way around this somehow? Comparison between dismissing a menu and a toolbar overflow: https://www.youtube.com/shorts/H2gUQOwos3Y Slowed down version of dismissing a menu with a visible light flash: https://www.youtube.com/shorts/MBCCkK-GfqY
0
0
227
Aug ’25
Human Interface guideline for Game Center Login.
I can't find any documentation on design guidelines for "Login with Game Center" button. My app allows users to "Play as Guest" or "Login with Game Center". Since Apple provides somewhat strict guidelines for designing "Sign in with Apple" button, i was wondering how to design the button for Game Center login. Should i use Game Center icon. And will Apple review reject this?
0
0
376
Aug ’25
Scene for my "Application's Menu About "My Application""
I am using SwiftUI to create an app and I have figured out how to present a scene for my preferences window. However I have yet to find a way to modify the "About "My App"" scene. I am not even sure how to ask the question on other forums because I keep getting informations on application menus. I would like to find information on accessing/changing other menu entries in the menubar (in SwiftUI) an most specifically I would like to find out how to present a custom window (or at least custom information) when the user selects "About "My App"" I guess I don't need a solution but a pointer to documentation that will help me in my quest.
3
0
1.1k
Apr ’25
Inconsistent DragGesture translation?
I feel like I must be missing something dumb, but I can't figure it out. I'm trying to create a modifier to make items resizable by dragging on the corner (I haven't actually implemented the corner part yet though so dragging anywhere on the object resizes it). However the rate that I'm dragging at is different from the rate that the object is resizing. It's also different for horizontal and vertical translation (the horizontal change is smaller than the rate that I'm dragging while the vertical change is larger). Any help would be greatly appreciated! Here's my code for the modifier: struct Resizable: ViewModifier { @State var size: CGSize = CGSize(width: 500, height: 500) @State var activeSize: CGSize = .zero func body(content: Content) -> some View { content .frame(width: abs(size.width + activeSize.width), height: abs(size.height + activeSize.height)) // offset is so the top right corner doesn't move .offset(x: -abs(size.width + activeSize.width) / 2, y: abs(size.height + activeSize.height) / 2) .gesture( DragGesture() .onChanged { gesture in activeSize.width = -gesture.translation.width activeSize.height = gesture.translation.height } .onEnded { _ in size.width += activeSize.width size.height += activeSize.height activeSize = .zero } ) } } extension View { func resizable(maxSize: CGSize = .zero) -> some View { modifier(Resizable()) } } And it is used like so: struct ContentView: View { var body: some View { Rectangle() .fill(Color.blue) .resizable() } }
1
0
480
Dec ’24
Delay between animation and view accepting touch input
Hi! I was trying to add an animation to my SwiftUI view with UIKit, but after the animation runs there's a delay before the view will accept touch interactions. I thought it was because of the frame size of the view controller, but even after fixing that I still get the delay. Could anyone point me to where I might be going wrong, or if maybe using a UIKit modifier for the animation just doesn't work? Any help would be greatly appreciated! UIView: class BounceView: UIView { required init() { super.init(frame: .zero) } func bounceAnimation() { guard let piece = self.subviews.first else { return } UIView.animate(withDuration: 0.7, delay: 0, usingSpringWithDamping: 0.7, initialSpringVelocity: 0) { piece.frame.origin.x += 10 } } func bounceBack() { guard let piece = self.subviews.first else { return } UIView.animate(withDuration: 0.7, delay: 0, usingSpringWithDamping: 0.7, initialSpringVelocity: 0) { piece.frame.origin.x -= 10 } } required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } } UIView controller: class BounceViewController: UIViewController { init(controller: UIViewController) { super.init(nibName: nil, bundle: nil) view = BounceView() addChild(controller) controller.view.translatesAutoresizingMaskIntoConstraints = false controller.view.backgroundColor = .clear view.addSubview(controller.view) controller.didMove(toParent: self) } // adjusts view to match bounds of child override func viewDidLayoutSubviews() { super.viewDidLayoutSubviews() let subviewFrame = self.view.subviews.first?.bounds ?? .zero view.frame = subviewFrame print(subviewFrame) self.updateViewConstraints() } func update(animated: Bool) { let bounceView = view as? BounceView if animated { bounceView?.bounceAnimation() } else { bounceView?.bounceBack() } } required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } } SwiftUI wrapper: struct BounceUIViewController: UIViewControllerRepresentable { private var controller: UIViewController @Binding var animated: Bool init(controller: UIViewController, animated: Binding<Bool>) { self.controller = controller self._animated = animated } func makeUIViewController(context: Context) -> BounceViewController { BounceViewController(controller: controller) } func updateUIViewController(_ uiViewController: BounceViewController, context: Context) { uiViewController.update(animated: animated) } } View extension: extension View { func bounce(animated: Binding<Bool>) -> some View { modifier(Bounce(animated: animated)) } } struct Bounce: ViewModifier { @Binding var animated: Bool init(animated: Binding<Bool>) { self._animated = animated } func body(content: Content) -> some View { BounceUIViewController(controller: content.uiViewController, animated: $animated) } }
1
0
768
Dec ’24
In-app payment via bottom-up swipe gesture
This question came up, a customer wants to add payment, with gesture, to their app. This gesture is a swipe, from bottom to top (like when minimizing applications). The question immediately arose, will the application pass the review with such UI/UX ? Will there be any problems ? I'm not talking about problems when the user can minimize the application when paying, or pay (accidentally) when minimizing. I want to know if there will be any problems from Apple's rules when releasing the app ? I haven't found the exact information yet
1
0
515
Nov ’24
Sign in With Apple works, but blocks app afterwards
This is a continuation of https://developer.apple.com/forums/thread/760861 Still a mixed Qt/C++/ObjC app, developed with Qt Creator. The gist ist that I can call Sign in With Apple and authorise, but once the Authorisation Window/Panel goes away, the app is blocked. PBSigninWithApple:: PBSigninWithApple() { myImpl = [[PBSigninWithApple alloc] initWithOwner:this]; } - (id)initWithOwner:(PBSigninWithApple *) owner { self = [super init]; myOwnerSIWA = owner; ASAuthorizationAppleIDProvider *appleIDProvider = [ASAuthorizationAppleIDProvider new]; ASAuthorizationAppleIDRequest *request = appleIDProvider.createRequest; request.requestedScopes = @[ASAuthorizationScopeFullName, ASAuthorizationScopeEmail]; ASAuthorizationController *controller = [[ASAuthorizationController alloc] initWithAuthorizationRequests:@[request]]; controller.presentationContextProvider = self; controller.delegate = self; [controller performRequests]; return self; } The code example above is obviously reduced, but the real things works. I get the Sign in With Apple window and can authorise by TouchId. The didCompleteWithAuthorization and didCompleteWithError methods also work, emitting the the idendityToken to the calling superclass works, the authorisation window goes away - but not really. The calling QT app is semi-blocked. I can close windows ny using the Escape key, but any clicking just gives the dreaded beep and nothing happens. So I assume that we didn‘t tear down everything and that the anchor or whatever still has to focus. - (void)authorizationController:(ASAuthorizationController *)controller didCompleteWithAuthorization:(ASAuthorization *)authorization API_AVAILABLE(macos(10.15)) { if ([authorization.credential isKindOfClass:[ASAuthorizationAppleIDCredential class]]) { ASAuthorizationAppleIDCredential *appleIDCredential = authorization.credential; NSString *user = appleIDCredential.user; NSData *identityToken = appleIDCredential.identityToken; NSData *authorizationCode = appleIDCredential.authorizationCode; emit myOwnerSIWA-&gt;accessCodeReceived(identityToken); } [[NSNotificationCenter defaultCenter] removeObserver:self name:ASAuthorizationAppleIDProviderCredentialRevokedNotification object:nil]; [myAnker close]; [self release]; } - (void)authorizationController:(ASAuthorizationController *)controller didCompleteWithError:(ASAuthorization *)authorization API_AVAILABLE(macos(10.15)) { emit myOwnerSIWA-&gt;accessCodeReceived(QString("")); [[NSNotificationCenter defaultCenter] removeObserver:self name:ASAuthorizationAppleIDProviderCredentialRevokedNotification object:nil]; } -(ASPresentationAnchor)presentationAnchorForAuthorizationController:(ASAuthorizationController *)controller API_AVAILABLE(macos(10.15)) { NSRect frame = NSMakeRect(30, 30, 230, 230); NSUInteger windowStyle = NSWindowStyleMaskTitled | NSWindowStyleMaskClosable | NSWindowStyleMaskResizable | NSWindowStyleMaskFullSizeContentView; NSWindow* window = [[[NSWindow alloc] initWithContentRect:frame styleMask:windowStyle backing:NSBackingStoreBuffered defer:NO] autorelease]; window.minSize = CGSizeMake(200, 100); window.releasedWhenClosed = TRUE; myAnker = window; return window; }
1
0
728
Sep ’24
Passing touches from UIView to a child view?
I made an extension with a UIView that takes a SwiftUI view, gets its UIView, and then adds it as a subview. But now the subview isn't receiving any touches and idk how to fix that. I've already tried point(inside:with:) but it doesn't seem to work. I've also tried forwarding the touches from touchesBegan, touchesMoved, etc., but that didn't work either. Any help or advice would be greatly appreciated! Extension with the UIView: // Add view modifier to View extension View { func transformable() -> some View { modifier(Transformable()) } } // View modifier struct Transformable: ViewModifier { func body(content: Content) -> some View { TransformableUIView(content: content) } } // Wrap UIView struct TransformableUIView<V>: UIViewRepresentable where V: View { private var content: V init(content: V) { self.content = content } func makeUIView(context: Context) -> TransformableView<V> { TransformableView(content: content) } func updateUIView(_ uiView: TransformableView<V>, context: Context) {} } // View that handles zoom, pan, and rotate gestures class TransformableView<V>: UIView, UIGestureRecognizerDelegate where V: View { private var content: V private var initialCenter: CGPoint = .zero private var totalScale: CGFloat = 1.0 private var boundsDidSet = false required init(content: V) { self.content = content super.init(frame: .zero) self.addSubview(content.uiView) let panGesture = UIPanGestureRecognizer(target: self, action: #selector(panPiece(_:))) panGesture.minimumNumberOfTouches = 2 panGesture.maximumNumberOfTouches = 2 panGesture.delegate = self self.addGestureRecognizer(panGesture) let scaleGesture = UIPinchGestureRecognizer(target: self, action: #selector(scalePiece(_:))) scaleGesture.delegate = self self.addGestureRecognizer(scaleGesture) let rotateGesture = UIRotationGestureRecognizer(target: self, action: #selector(rotatePiece(_:))) rotateGesture.delegate = self self.addGestureRecognizer(rotateGesture) } // Position content in center of view override func layoutSubviews() { super.layoutSubviews() // Return if bounds are already set if boundsDidSet { return } guard let piece = self.subviews.first else { return } piece.center = CGPoint(x: self.bounds.size.width / 2, y: self.bounds.size.height / 2) boundsDidSet = true } // Function called when pan gesture is recognized @objc private func panPiece(_ gestureRecognizer: UIPanGestureRecognizer) { guard let piece = gestureRecognizer.view?.subviews.first else { return } // Get the changes in the X and Y directions relative to // the superview's coordinate space. let translation = gestureRecognizer.translation(in: piece.superview) if gestureRecognizer.state == .began { // Save the view's original position. self.initialCenter = piece.center } // Update the position for the .began, .changed, and .ended states if gestureRecognizer.state != .cancelled { // Add the X and Y translation to the view's original position. var newCenter = CGPoint(x: initialCenter.x + translation.x, y: initialCenter.y + translation.y) // Prevent content from leaving view newCenter.x = clamp(value: newCenter.x, min: 0, max: self.bounds.width) newCenter.y = clamp(value: newCenter.y, min: 0, max: self.bounds.height) piece.center = newCenter } else { // On cancellation, return the piece to its original location. piece.center = initialCenter } } // Function called when scale gesture is recognized @objc private func scalePiece(_ gestureRecognizer : UIPinchGestureRecognizer) { guard let piece = gestureRecognizer.view?.subviews.first else { return } if gestureRecognizer.state == .began || gestureRecognizer.state == .changed { // Set min/max zoom let newScale = clamp(value: totalScale * gestureRecognizer.scale, min: 0.2, max: 20) / totalScale piece.transform = (piece.transform.scaledBy(x: newScale, y: newScale)) gestureRecognizer.scale = 1.0 totalScale *= newScale } } // Function called when rotate gesture is recognized @objc private func rotatePiece(_ gestureRecognizer : UIRotationGestureRecognizer) { guard let piece = gestureRecognizer.view?.subviews.first else { return } if gestureRecognizer.state == .began || gestureRecognizer.state == .changed { piece.transform = piece.transform.rotated(by: gestureRecognizer.rotation) gestureRecognizer.rotation = 0 } } func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool { return true } func clamp(value: CGFloat, min: CGFloat, max: CGFloat) -> CGFloat { if value < min { return min } else if value > max { return max } else { return value } } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } } Get UIView from SwiftUI View: // Get UIView from SwiftUI View extension View { var uiView: UIView { UIHostingController(rootView: self).view } } ContentView: struct ContentView: View { var body: some View { CanvasView() .frame(width: 880, height: 608) .transformable() .background(Color.blue) } }
1
0
1.1k
Jul ’24
What is the secret to good UI?
Hello, I’m an aspiring full stack dev and I’m just wondering how the heck you get good UI AND UX. I’m currently moodboarding and seeing how things look in FigJam and then taking that and coding in Swift. I am struggling and my sanity is hanging on by a string 😂. So tell me, how do you get good UI and UX?
2
1
1k
Jul ’24
Zoom in
Hii apple! What about zooming with 2 fingers without making a screenshot to zoom it!! I will love to make a pattent about it!!! Everywhere we ad on the iphone should we zoom in with 2 fingers!!! love to hear from ya
1
0
915
Jun ’24
How to interact during the Transition process?(wwdc24 UIKit consultation)
Recently I tried to apply a custom transition to a custom contextMenu. However, I want to make sure that during the transition process (which is not over yet), my contextMenu elements such as buttons can be tapped. But I tried a lot of things without success. I know you have a lot of experience, so I would like to ask you about how to implement the transition and be able to interact before it is over. I know that a UIView can be tapped during animation, but I haven't tried the button in a UIView. I've been trying to transition ViewControllers. For example, in a transition from fromViewController to toViewController, I wanted to be able to tap on a tableView in toViewController during the transition, but I was frustrated and found it very difficult to implement. I would like to ask you about the possibilities of interaction during the Viewcontrollers transition. (PS: In Github Issues, I uploaded a GIF example of the plus button on the left of the input box in iMessage. After tapping the plus button, you can tap the "Apple Cash" button before the transition is finished.) Your advice would be incredibly valuable to me. Thank you in advance for your time and assistance. [GithubLink]https://github.com/Juhnkerg/DemoForInteractionDuringTransition)
0
1
748
Jun ’24
4.3.0 Design Spam
Hello, I've a team for developing game in my small company. And we've developed an Obstacle game in Unity from scratch. every single UI, logic & even sound is implemented by our own developers and musicians. It means, every single element is proprietory of our own. I suggest you folks to try out the game in Android playstore by searching the game name as "Cherry Blossom Hills Obstacle" . But once I submitted the same game in iOS App store, the reviewers continously saying, it's a 4.3.0 Design Spam without any to the point feedback basically :( Could you anyone help me resolving this issue? A definitive but even single help/suggestion would be highly appreciated. Regards, Md. Rezoanul Alam.
1
0
1.3k
Feb ’24
User Age
Hello! I need advice. According to Apple's guidelines, is it permissible to ask users during the initial app launch, through an OnBoarding screen (example in the screenshot), if they are older than 16 when the Age Rating on the App Store is set to 9+? I want to determine if the user from Europe and the UK has reached the age of consent in order to display or not display the GDPR consent form to them. Thanks!
0
1
957
Dec ’23
Full Screen Cover and iPhone Orientation
Currently, there seems to be an all or nothing approach to supporting rotation on iPhone. Either every screen in your UI supports rotation, or none of them do. For a some apps however, that approach won't work. They have a number of screens that don't adapt well to a super letterboxed screen size, and a number of others that would benefit from the additional screen space. Previous discussion on this issue recommends the use of size classes, but this advice fails to recognise that some use cases simply aren't suited to being super letterboxed. Apple's own UI design is tacit acknowledgement of this: For example, the main UI of the Camera app stays fixed in the portrait orientation in the shooting mode, but presents a rotatable modal to review photos and videos. Even Springboard, the home screen of the iPhone, remains locked in the portrait orientation whilst allowing an app to be presented in landscape. Social media and news apps are another example: generally anchored around a portrait newsfeed that doesn't adapt well to extreme letterboxing, but surfacing rich media such as images, videos, charts and other interactive elements that could use the flexibility of landscape presentation. (News app, looking at you.) Is it time to re-visit the rotation characteristics of the phone vs. tablet idioms? Is this all-or-nothing approach to rotation serving the platform well? Regardless, app designers at Apple and elsewhere are creating apps that use this hybrid approach to rotation. And as things stand today, SwiftUI makes it very difficult. A rough equivalent can be made using a ZStack and observing the device orientation, but this requires hiding the status bar and provides no way to honor a user's portrait lock settings. The only other option, as far as I can tell, is building the app using UIKit view controllers, to thread through supportedInterfaceOrientations hooks. Personally, what I'd love to see is a new presentationInterfaceOrientations(_:) hook on View, that allows a fullScreenCover presentation to be specified as supporting an alternative orientation set. This could be iPhone only, and should serve the majority of use cases. However, in the meantime, it would be great to know if there's a technique that can get the UIKit behavior in a SwiftUI app that doesn't require rewriting the entire container view hierachy in UIKit.
0
1
1.1k
Oct ’23
Best position for dismiss button on sheets?
Is there any guidance on changes here between iOS 26 & 27? To go .topLeading or .topTrailing? That is the question. iOS 26 iOS 27
Replies
1
Boosts
0
Views
249
Activity
1w
What's the one Icon Composer feature that completely changed the way you design app icons?
For those who've spent some time with Icon Composer, what's the single feature, technique, or workflow trick that made the biggest difference in your icon design process? I'd love to hear real-world examples and lessons learned. Thanks!
Replies
1
Boosts
1
Views
143
Activity
2w
Proposal: Capacitive swipe-based volume control integrated into iPhone frame
I would like to propose a design enhancement for future iPhone models: using the existing bottom-right antenna line (next to the power button area) as a capacitive “volume control zone” that supports swipe gestures. Today this line is a structural antenna break, but it is also located exactly where the thumb naturally rests when holding the phone in one hand. With a small embedded capacitive/force sensor, the user could slide their finger along this zone to control volume without reaching for the physical buttons. Why this makes sense: • Perfect ergonomic thumb position in both portrait and landscape • One-handed volume adjustment becomes easier for large-screen devices • Silent and frictionless vs. clicking buttons (useful in meetings / night mode) • Consistent with Apple’s recent move toward contextual hardware input (Action Button, Capture Button, Vision Pro gestures) The interaction model would be: • Swipe up → increase volume • Swipe down → decrease volume • (Optional) long-press haptic = mute toggle This could also enhance accessibility, especially for users with reduced hand mobility who struggle to press mechanical buttons on tall devices. Technically, this would be similar to the Capture Button (capacitive + pressure layers), but linear instead of pressure-based. It does not replace physical buttons, it complements them as a silent gesture-based alternative. Thank you for considering this as a future interaction refinement for iPhone hardware design.
Replies
2
Boosts
0
Views
740
Activity
Oct ’25
Liquid Glass clear variant isn't clear
I've been experimenting with Liquid Glass quite a bit and watched all the WWDC videos. I'm trying to create a glassy segmented picker, like the one used in Camera: however, it seems that no matter what I do there's no way to recreate a truly clear (passthrough) bubble that just warps the light underneath around the edges. Both Glass.regular and Glass.clear seem to add a blur that can not be evaded, which is counter to what clear ought to mean. Here are my results: I've used SwiftUI for my experiment but I went through the UIKit APIs and there doesn't seem to be anything that suggests full transparency. Here is my test SwiftUI code: struct GlassPicker: View { @State private var selected: Int? var body: some View { ScrollView([.horizontal], showsIndicators: false) { HStack(spacing: 0) { ForEach(0..<20) { i in Text("Row \(i)") .id(i) .padding() } } .scrollTargetLayout() } .contentMargins(.horizontal, 161) .scrollTargetBehavior(.viewAligned) .scrollPosition(id: $selected, anchor: .center) .background(.foreground.opacity(0.2)) .clipShape(.capsule) .overlay { DefaultGlassEffectShape() .fill(.clear) // Removes a semi-transparent foreground fill .frame(width: 110, height: 50) .glassEffect(.clear) } } } Is there any way to achieve the above result or does Apple not trust us devs with more granular control over these liquid glass elements?
Replies
2
Boosts
3
Views
243
Activity
Aug ’25
Menu view flashes white before closing when device is set to dark appearance
Feedback ID: FB19846667 When dismissing a Menu view when the device is set to dark appearance, there is a flash of lightness that is distracting and feels unnatural. This becomes an issue for apps that rely on the user interacting with Menu views often. When using the overflow menu on a toolbar, the effect of dismissing the menu is a lot more natural and there is less flashing. I expect a similar visual effect when creating Menu views outside of a toolbar. Has anyone found a way around this somehow? Comparison between dismissing a menu and a toolbar overflow: https://www.youtube.com/shorts/H2gUQOwos3Y Slowed down version of dismissing a menu with a visible light flash: https://www.youtube.com/shorts/MBCCkK-GfqY
Replies
0
Boosts
0
Views
227
Activity
Aug ’25
Human Interface guideline for Game Center Login.
I can't find any documentation on design guidelines for "Login with Game Center" button. My app allows users to "Play as Guest" or "Login with Game Center". Since Apple provides somewhat strict guidelines for designing "Sign in with Apple" button, i was wondering how to design the button for Game Center login. Should i use Game Center icon. And will Apple review reject this?
Replies
0
Boosts
0
Views
376
Activity
Aug ’25
Scene for my "Application's Menu About "My Application""
I am using SwiftUI to create an app and I have figured out how to present a scene for my preferences window. However I have yet to find a way to modify the "About "My App"" scene. I am not even sure how to ask the question on other forums because I keep getting informations on application menus. I would like to find information on accessing/changing other menu entries in the menubar (in SwiftUI) an most specifically I would like to find out how to present a custom window (or at least custom information) when the user selects "About "My App"" I guess I don't need a solution but a pointer to documentation that will help me in my quest.
Replies
3
Boosts
0
Views
1.1k
Activity
Apr ’25
iOS build failing due not enabling landscape?
I'm seeing a build failure when archiving for TestFlight due to removing landscape support from the project. I see tons of apps that lock portrait in the app store. Is this a new requirement for apps compatible with both iPhone and iPad? What is the best approach if I am focused on portrait? Make the app iPhone only?
Replies
1
Boosts
0
Views
146
Activity
Mar ’25
Inconsistent DragGesture translation?
I feel like I must be missing something dumb, but I can't figure it out. I'm trying to create a modifier to make items resizable by dragging on the corner (I haven't actually implemented the corner part yet though so dragging anywhere on the object resizes it). However the rate that I'm dragging at is different from the rate that the object is resizing. It's also different for horizontal and vertical translation (the horizontal change is smaller than the rate that I'm dragging while the vertical change is larger). Any help would be greatly appreciated! Here's my code for the modifier: struct Resizable: ViewModifier { @State var size: CGSize = CGSize(width: 500, height: 500) @State var activeSize: CGSize = .zero func body(content: Content) -> some View { content .frame(width: abs(size.width + activeSize.width), height: abs(size.height + activeSize.height)) // offset is so the top right corner doesn't move .offset(x: -abs(size.width + activeSize.width) / 2, y: abs(size.height + activeSize.height) / 2) .gesture( DragGesture() .onChanged { gesture in activeSize.width = -gesture.translation.width activeSize.height = gesture.translation.height } .onEnded { _ in size.width += activeSize.width size.height += activeSize.height activeSize = .zero } ) } } extension View { func resizable(maxSize: CGSize = .zero) -> some View { modifier(Resizable()) } } And it is used like so: struct ContentView: View { var body: some View { Rectangle() .fill(Color.blue) .resizable() } }
Replies
1
Boosts
0
Views
480
Activity
Dec ’24
Delay between animation and view accepting touch input
Hi! I was trying to add an animation to my SwiftUI view with UIKit, but after the animation runs there's a delay before the view will accept touch interactions. I thought it was because of the frame size of the view controller, but even after fixing that I still get the delay. Could anyone point me to where I might be going wrong, or if maybe using a UIKit modifier for the animation just doesn't work? Any help would be greatly appreciated! UIView: class BounceView: UIView { required init() { super.init(frame: .zero) } func bounceAnimation() { guard let piece = self.subviews.first else { return } UIView.animate(withDuration: 0.7, delay: 0, usingSpringWithDamping: 0.7, initialSpringVelocity: 0) { piece.frame.origin.x += 10 } } func bounceBack() { guard let piece = self.subviews.first else { return } UIView.animate(withDuration: 0.7, delay: 0, usingSpringWithDamping: 0.7, initialSpringVelocity: 0) { piece.frame.origin.x -= 10 } } required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } } UIView controller: class BounceViewController: UIViewController { init(controller: UIViewController) { super.init(nibName: nil, bundle: nil) view = BounceView() addChild(controller) controller.view.translatesAutoresizingMaskIntoConstraints = false controller.view.backgroundColor = .clear view.addSubview(controller.view) controller.didMove(toParent: self) } // adjusts view to match bounds of child override func viewDidLayoutSubviews() { super.viewDidLayoutSubviews() let subviewFrame = self.view.subviews.first?.bounds ?? .zero view.frame = subviewFrame print(subviewFrame) self.updateViewConstraints() } func update(animated: Bool) { let bounceView = view as? BounceView if animated { bounceView?.bounceAnimation() } else { bounceView?.bounceBack() } } required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } } SwiftUI wrapper: struct BounceUIViewController: UIViewControllerRepresentable { private var controller: UIViewController @Binding var animated: Bool init(controller: UIViewController, animated: Binding<Bool>) { self.controller = controller self._animated = animated } func makeUIViewController(context: Context) -> BounceViewController { BounceViewController(controller: controller) } func updateUIViewController(_ uiViewController: BounceViewController, context: Context) { uiViewController.update(animated: animated) } } View extension: extension View { func bounce(animated: Binding<Bool>) -> some View { modifier(Bounce(animated: animated)) } } struct Bounce: ViewModifier { @Binding var animated: Bool init(animated: Binding<Bool>) { self._animated = animated } func body(content: Content) -> some View { BounceUIViewController(controller: content.uiViewController, animated: $animated) } }
Replies
1
Boosts
0
Views
768
Activity
Dec ’24
In-app payment via bottom-up swipe gesture
This question came up, a customer wants to add payment, with gesture, to their app. This gesture is a swipe, from bottom to top (like when minimizing applications). The question immediately arose, will the application pass the review with such UI/UX ? Will there be any problems ? I'm not talking about problems when the user can minimize the application when paying, or pay (accidentally) when minimizing. I want to know if there will be any problems from Apple's rules when releasing the app ? I haven't found the exact information yet
Replies
1
Boosts
0
Views
515
Activity
Nov ’24
Sign in With Apple works, but blocks app afterwards
This is a continuation of https://developer.apple.com/forums/thread/760861 Still a mixed Qt/C++/ObjC app, developed with Qt Creator. The gist ist that I can call Sign in With Apple and authorise, but once the Authorisation Window/Panel goes away, the app is blocked. PBSigninWithApple:: PBSigninWithApple() { myImpl = [[PBSigninWithApple alloc] initWithOwner:this]; } - (id)initWithOwner:(PBSigninWithApple *) owner { self = [super init]; myOwnerSIWA = owner; ASAuthorizationAppleIDProvider *appleIDProvider = [ASAuthorizationAppleIDProvider new]; ASAuthorizationAppleIDRequest *request = appleIDProvider.createRequest; request.requestedScopes = @[ASAuthorizationScopeFullName, ASAuthorizationScopeEmail]; ASAuthorizationController *controller = [[ASAuthorizationController alloc] initWithAuthorizationRequests:@[request]]; controller.presentationContextProvider = self; controller.delegate = self; [controller performRequests]; return self; } The code example above is obviously reduced, but the real things works. I get the Sign in With Apple window and can authorise by TouchId. The didCompleteWithAuthorization and didCompleteWithError methods also work, emitting the the idendityToken to the calling superclass works, the authorisation window goes away - but not really. The calling QT app is semi-blocked. I can close windows ny using the Escape key, but any clicking just gives the dreaded beep and nothing happens. So I assume that we didn‘t tear down everything and that the anchor or whatever still has to focus. - (void)authorizationController:(ASAuthorizationController *)controller didCompleteWithAuthorization:(ASAuthorization *)authorization API_AVAILABLE(macos(10.15)) { if ([authorization.credential isKindOfClass:[ASAuthorizationAppleIDCredential class]]) { ASAuthorizationAppleIDCredential *appleIDCredential = authorization.credential; NSString *user = appleIDCredential.user; NSData *identityToken = appleIDCredential.identityToken; NSData *authorizationCode = appleIDCredential.authorizationCode; emit myOwnerSIWA-&gt;accessCodeReceived(identityToken); } [[NSNotificationCenter defaultCenter] removeObserver:self name:ASAuthorizationAppleIDProviderCredentialRevokedNotification object:nil]; [myAnker close]; [self release]; } - (void)authorizationController:(ASAuthorizationController *)controller didCompleteWithError:(ASAuthorization *)authorization API_AVAILABLE(macos(10.15)) { emit myOwnerSIWA-&gt;accessCodeReceived(QString("")); [[NSNotificationCenter defaultCenter] removeObserver:self name:ASAuthorizationAppleIDProviderCredentialRevokedNotification object:nil]; } -(ASPresentationAnchor)presentationAnchorForAuthorizationController:(ASAuthorizationController *)controller API_AVAILABLE(macos(10.15)) { NSRect frame = NSMakeRect(30, 30, 230, 230); NSUInteger windowStyle = NSWindowStyleMaskTitled | NSWindowStyleMaskClosable | NSWindowStyleMaskResizable | NSWindowStyleMaskFullSizeContentView; NSWindow* window = [[[NSWindow alloc] initWithContentRect:frame styleMask:windowStyle backing:NSBackingStoreBuffered defer:NO] autorelease]; window.minSize = CGSizeMake(200, 100); window.releasedWhenClosed = TRUE; myAnker = window; return window; }
Replies
1
Boosts
0
Views
728
Activity
Sep ’24
Passing touches from UIView to a child view?
I made an extension with a UIView that takes a SwiftUI view, gets its UIView, and then adds it as a subview. But now the subview isn't receiving any touches and idk how to fix that. I've already tried point(inside:with:) but it doesn't seem to work. I've also tried forwarding the touches from touchesBegan, touchesMoved, etc., but that didn't work either. Any help or advice would be greatly appreciated! Extension with the UIView: // Add view modifier to View extension View { func transformable() -> some View { modifier(Transformable()) } } // View modifier struct Transformable: ViewModifier { func body(content: Content) -> some View { TransformableUIView(content: content) } } // Wrap UIView struct TransformableUIView<V>: UIViewRepresentable where V: View { private var content: V init(content: V) { self.content = content } func makeUIView(context: Context) -> TransformableView<V> { TransformableView(content: content) } func updateUIView(_ uiView: TransformableView<V>, context: Context) {} } // View that handles zoom, pan, and rotate gestures class TransformableView<V>: UIView, UIGestureRecognizerDelegate where V: View { private var content: V private var initialCenter: CGPoint = .zero private var totalScale: CGFloat = 1.0 private var boundsDidSet = false required init(content: V) { self.content = content super.init(frame: .zero) self.addSubview(content.uiView) let panGesture = UIPanGestureRecognizer(target: self, action: #selector(panPiece(_:))) panGesture.minimumNumberOfTouches = 2 panGesture.maximumNumberOfTouches = 2 panGesture.delegate = self self.addGestureRecognizer(panGesture) let scaleGesture = UIPinchGestureRecognizer(target: self, action: #selector(scalePiece(_:))) scaleGesture.delegate = self self.addGestureRecognizer(scaleGesture) let rotateGesture = UIRotationGestureRecognizer(target: self, action: #selector(rotatePiece(_:))) rotateGesture.delegate = self self.addGestureRecognizer(rotateGesture) } // Position content in center of view override func layoutSubviews() { super.layoutSubviews() // Return if bounds are already set if boundsDidSet { return } guard let piece = self.subviews.first else { return } piece.center = CGPoint(x: self.bounds.size.width / 2, y: self.bounds.size.height / 2) boundsDidSet = true } // Function called when pan gesture is recognized @objc private func panPiece(_ gestureRecognizer: UIPanGestureRecognizer) { guard let piece = gestureRecognizer.view?.subviews.first else { return } // Get the changes in the X and Y directions relative to // the superview's coordinate space. let translation = gestureRecognizer.translation(in: piece.superview) if gestureRecognizer.state == .began { // Save the view's original position. self.initialCenter = piece.center } // Update the position for the .began, .changed, and .ended states if gestureRecognizer.state != .cancelled { // Add the X and Y translation to the view's original position. var newCenter = CGPoint(x: initialCenter.x + translation.x, y: initialCenter.y + translation.y) // Prevent content from leaving view newCenter.x = clamp(value: newCenter.x, min: 0, max: self.bounds.width) newCenter.y = clamp(value: newCenter.y, min: 0, max: self.bounds.height) piece.center = newCenter } else { // On cancellation, return the piece to its original location. piece.center = initialCenter } } // Function called when scale gesture is recognized @objc private func scalePiece(_ gestureRecognizer : UIPinchGestureRecognizer) { guard let piece = gestureRecognizer.view?.subviews.first else { return } if gestureRecognizer.state == .began || gestureRecognizer.state == .changed { // Set min/max zoom let newScale = clamp(value: totalScale * gestureRecognizer.scale, min: 0.2, max: 20) / totalScale piece.transform = (piece.transform.scaledBy(x: newScale, y: newScale)) gestureRecognizer.scale = 1.0 totalScale *= newScale } } // Function called when rotate gesture is recognized @objc private func rotatePiece(_ gestureRecognizer : UIRotationGestureRecognizer) { guard let piece = gestureRecognizer.view?.subviews.first else { return } if gestureRecognizer.state == .began || gestureRecognizer.state == .changed { piece.transform = piece.transform.rotated(by: gestureRecognizer.rotation) gestureRecognizer.rotation = 0 } } func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool { return true } func clamp(value: CGFloat, min: CGFloat, max: CGFloat) -> CGFloat { if value < min { return min } else if value > max { return max } else { return value } } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } } Get UIView from SwiftUI View: // Get UIView from SwiftUI View extension View { var uiView: UIView { UIHostingController(rootView: self).view } } ContentView: struct ContentView: View { var body: some View { CanvasView() .frame(width: 880, height: 608) .transformable() .background(Color.blue) } }
Replies
1
Boosts
0
Views
1.1k
Activity
Jul ’24
What is the secret to good UI?
Hello, I’m an aspiring full stack dev and I’m just wondering how the heck you get good UI AND UX. I’m currently moodboarding and seeing how things look in FigJam and then taking that and coding in Swift. I am struggling and my sanity is hanging on by a string 😂. So tell me, how do you get good UI and UX?
Replies
2
Boosts
1
Views
1k
Activity
Jul ’24
Zoom in
Hii apple! What about zooming with 2 fingers without making a screenshot to zoom it!! I will love to make a pattent about it!!! Everywhere we ad on the iphone should we zoom in with 2 fingers!!! love to hear from ya
Replies
1
Boosts
0
Views
915
Activity
Jun ’24
How to interact during the Transition process?(wwdc24 UIKit consultation)
Recently I tried to apply a custom transition to a custom contextMenu. However, I want to make sure that during the transition process (which is not over yet), my contextMenu elements such as buttons can be tapped. But I tried a lot of things without success. I know you have a lot of experience, so I would like to ask you about how to implement the transition and be able to interact before it is over. I know that a UIView can be tapped during animation, but I haven't tried the button in a UIView. I've been trying to transition ViewControllers. For example, in a transition from fromViewController to toViewController, I wanted to be able to tap on a tableView in toViewController during the transition, but I was frustrated and found it very difficult to implement. I would like to ask you about the possibilities of interaction during the Viewcontrollers transition. (PS: In Github Issues, I uploaded a GIF example of the plus button on the left of the input box in iMessage. After tapping the plus button, you can tap the "Apple Cash" button before the transition is finished.) Your advice would be incredibly valuable to me. Thank you in advance for your time and assistance. [GithubLink]https://github.com/Juhnkerg/DemoForInteractionDuringTransition)
Replies
0
Boosts
1
Views
748
Activity
Jun ’24
Error 1110
Hello everyone, My iPhone has still not working for 3 months because of Error 1110. I hope the Apple software team can see this message and support us in fixing this issue soon, we lost our data and in this way, most people will not trust iPhones again if they can't find any fix even if this fix is by charge. Thank you. #1110 #error1110
Replies
1
Boosts
0
Views
1.1k
Activity
Apr ’24
4.3.0 Design Spam
Hello, I've a team for developing game in my small company. And we've developed an Obstacle game in Unity from scratch. every single UI, logic & even sound is implemented by our own developers and musicians. It means, every single element is proprietory of our own. I suggest you folks to try out the game in Android playstore by searching the game name as "Cherry Blossom Hills Obstacle" . But once I submitted the same game in iOS App store, the reviewers continously saying, it's a 4.3.0 Design Spam without any to the point feedback basically :( Could you anyone help me resolving this issue? A definitive but even single help/suggestion would be highly appreciated. Regards, Md. Rezoanul Alam.
Replies
1
Boosts
0
Views
1.3k
Activity
Feb ’24
User Age
Hello! I need advice. According to Apple's guidelines, is it permissible to ask users during the initial app launch, through an OnBoarding screen (example in the screenshot), if they are older than 16 when the Age Rating on the App Store is set to 9+? I want to determine if the user from Europe and the UK has reached the age of consent in order to display or not display the GDPR consent form to them. Thanks!
Replies
0
Boosts
1
Views
957
Activity
Dec ’23
Full Screen Cover and iPhone Orientation
Currently, there seems to be an all or nothing approach to supporting rotation on iPhone. Either every screen in your UI supports rotation, or none of them do. For a some apps however, that approach won't work. They have a number of screens that don't adapt well to a super letterboxed screen size, and a number of others that would benefit from the additional screen space. Previous discussion on this issue recommends the use of size classes, but this advice fails to recognise that some use cases simply aren't suited to being super letterboxed. Apple's own UI design is tacit acknowledgement of this: For example, the main UI of the Camera app stays fixed in the portrait orientation in the shooting mode, but presents a rotatable modal to review photos and videos. Even Springboard, the home screen of the iPhone, remains locked in the portrait orientation whilst allowing an app to be presented in landscape. Social media and news apps are another example: generally anchored around a portrait newsfeed that doesn't adapt well to extreme letterboxing, but surfacing rich media such as images, videos, charts and other interactive elements that could use the flexibility of landscape presentation. (News app, looking at you.) Is it time to re-visit the rotation characteristics of the phone vs. tablet idioms? Is this all-or-nothing approach to rotation serving the platform well? Regardless, app designers at Apple and elsewhere are creating apps that use this hybrid approach to rotation. And as things stand today, SwiftUI makes it very difficult. A rough equivalent can be made using a ZStack and observing the device orientation, but this requires hiding the status bar and provides no way to honor a user's portrait lock settings. The only other option, as far as I can tell, is building the app using UIKit view controllers, to thread through supportedInterfaceOrientations hooks. Personally, what I'd love to see is a new presentationInterfaceOrientations(_:) hook on View, that allows a fullScreenCover presentation to be specified as supporting an alternative orientation set. This could be iPhone only, and should serve the majority of use cases. However, in the meantime, it would be great to know if there's a technique that can get the UIKit behavior in a SwiftUI app that doesn't require rewriting the entire container view hierachy in UIKit.
Replies
0
Boosts
1
Views
1.1k
Activity
Oct ’23