Visual Design

RSS for tag

Discuss animation, branding, color, layout, typography, and other elements of great looking apps.

Posts under Visual Design tag

160 Posts

Post

Replies

Boosts

Views

Activity

SwiftUI: Losing animation when passing actions into a subview.
I have created the main view of my app and there is a button that will display a pop-up view doing some user input tasks. I would like the background dim view to fade in and fade out while the pop-up view is using scale animation in transition. The animation works pretty well while showing the view, but it does not work when it disappears. Following is my code that is relative to this problem. There is a button in the main view that will toggle isAddViewShown to display the pop-up view, and there are two buttons that will close it. So I passed the action into the pop-up view as shown, but it did not work. I'm pretty new to SwiftUI so I'm not sure whether that is what I'm supposed to do. Is there any way to let the animation work as designed? public struct SMMainView: View { @State private var isAddViewShown: Bool = false public var body: some View { ZStack { /* Some other views */ // This is actually a dim view using opacity animation in transition if isAddViewShown { Color.black.opacity(0.5) } // This is a customized pop-up view using scale animation in transition if isAddViewShown { SMAddView(onCreate: { name, description in /* do some extra operations with name and description */ withAnimation(.easeInOut(duration: 0.25)) { isAddViewShown.toggle() } }, onClose: { withAnimation(.easeInOut(duration: 0.25)) { isAddViewShown.toggle() } }) .transition(.scale) } } } } To avoid misunderstanding, the following is basically what I put for the pop-up view. struct SMAddView: View { @State private var name: String = "Title" @State private var description: String = "Please Enter description." private var createAction: (String, String) -> Void private var closeAction: () -> Void var body: some View { VStack { TextField("", text: $name) TextEditor(text: $description) Button(action: { createAction(name, description) name = "Title" description = "Please enter description." }) { Text("Create") } Button(action: { closeAction() name = "Title" description = "Please enter description." }) { Image(systemName: "xmark.circle") } } } init(onCreate create: @escaping (String, String) -> Void, onClose close: @escaping () -> Void) { createAction = create closeAction = close } }
0
0
1.4k
Apr ’22
App Icon Maker
Hi community, I want to share with you this small utility to resize your App Icons according to the Apple Human Interface Guideline. I created this a long time ago for personal use and now I want to make it public. Hope you can find it useful, it's simple but it is a time saver. https://appiconmaker.bateriasincluidas.com/ Cheers!
0
0
636
Apr ’22
Menu/Sidebar List Selection Background Specifications
I've searched all over and I am having trouble finding the menu/sidebar list selection background specifications. Dark Mode Sidebar Focused Light Mode Sidebar Focused Dark Mode Sidebar Unfocused Light Mode Sidebar Unfocused Dark Mode Menu Light Mode Menu It is not a solid blue background. It is a combination of blend modes and opacities that differ in light and dark mode that I would like specifics on because I am having to create something custom and I'd like it to match the rest of my application I am working on. Is there perhaps a variable that applies this background that I am not finding? You can find more information for our usage of this in our discussion here. I found some things but I do not know how accurate they are. Any help on this would be great. Thanks!
0
0
617
Mar ’22
What to use for animating app for iOS
What animation program do most developers or designers use for adding animations to their apps? I am a graphic/UI designer and have been working with XCode lately to develop an app. I would like to add animations to buttons, menus, and even full blown instructional animations for the user on how to use our products. I have used CoreAnimator, Adobe Animate and struggled with both. Adobe animate has issues with sizing for different devices and I have been working with them for months now trying to resolve the issue as it doesn't seem to be the constraints in Xcode. I am not the best at coding but I am willing to learn. Do I need to learn Core Animation code to be able to animate buttons menus etc? Or are libraries easier? As for the full blown instructional animations I feel like that would be more a long the lines of something similar to Adobe Animate? TIA!
3
0
2.4k
Mar ’22
"on screen"-homebutton overlaps layout of our app
Hello, I m one of the developers of the My CM app team (Belgian Health Insurance company). While testing on apple devices that have no physical homebutton, but the on-screen "black bar" we notice some strange behaviour. See picture attached. The phone on the left is a iPhone 13 Pro Max, the one on the right is an iPhone XR. Both have ios 15.2. Both phones have the same build of our app. On the Pro Max the black bar is on top of our layout, on the XR our layout seems to be pushed up a bit. The desired behaviour is the behaviour on the XR. Can somebody give us advice on how to handle this issue? Kind regards, Lode
1
0
760
Mar ’22
Degrees of Gray on iOS APPS
Hi so based on Apple UIG I should use degrees of transparency to get degrees of gray ? So to apply that on a label for example or text I make them black color then apply transparency on the control element it self ? kindest Regards
1
0
1k
Jan ’22
Graphics problem under Monterey (Intel Iris 1536 MB chip)
Hello, I have a graphics problem with Monterey on my Mac mini end of 2014 ( Graphics problem under Monterey (Intel Iris 1536 MB chip). The edges of the Dock and the Control Panel appearing full of artifact, like plastic cut with scissors or torn. My Mac being compatible it's strange and ugly. I should mention that other users with other Macs using this chip have the same problem.
0
0
631
Jan ’22
tvOS 14 UIBlurEffect crash
I have in my project different code which is responsible for the blur effect in my app. In tvOS 13 this worked fine but in tvOS 14 I have to remove the code otherwise the app will crash. What exactly do I have to change in the code to make it run on tvOS 14. Thanks for the help. private func sharedSetup(effect: UIBlurEffect, radius: CGFloat = 90) {			 let UICustomBlurEffect = NSClassFromString("_UICustomBlurEffect") as! UIBlurEffect.Type let raw = effect.value(forKey: "_style") as! Int let style = UIBlurEffect.Style(rawValue: raw)! let effect = UICustomBlurEffect.init(style: style)						 effect.setValue(1.0, forKey: "scale")		 effect.setValue(radius, forKey: "blurRadius")			 effect.setValue(UIColor.clear, forKey: "colorTint") self.blurEffect = effect	 }
2
0
1.8k
Jan ’22
Go outside of the view with an animation
Hello everyone . I have a button which is in a stack view. When my button is tapped it animates but it doesn’t perform the animation completely because it goes outside the stack view. Do you have any suggestions on how i can go outside my view with my animation? Also i am not able to get rid of the stack view. Thank you!!
0
0
887
Dec ’21
App screenshots in the Display P3 color space
Can you submit the app screenshots in the Display P3 color space? Will they be displayed correctly on the App Store? It is aberrant not to find this info in the documentation. The guidelines for the App of the Day and Feature Story cards are just as vague, only the resolution is specified. However, the provided templates are sRGB. This old post got me worried: https://stackoverflow.com/questions/54809327/appstore-connect-displayed-screenshots-wrong-colorspace
0
0
893
Dec ’21
iOS 15 beta 2 UItableviewcell spacing issue
We are using custom UITableViewCell in UITableview. While we testing our application on iOS15 beta 2 version, we observe extra space in between 2 UITableViewCells. Same UI is working fine on iOS 14 and below. Do we need to make any extra changes to handle this for iOS 15 or it will be fixed in next iOS 15 beta release?
5
0
8.6k
Nov ’21
MFMessageComposeViewController body text coloration
I'm working on a custom keyboard extension, and am currently a bit stuck on a feature. The goal is to color certain words that a user types in the preview of messaging apps - like how the emoji keyboard colors words orange that can be converted to emojis. My general understanding is that this is done through MFMessageComposeViewController, with the target of the coloration being the body of this object. It looks like UIApperance can be used in this case, but I'm really not sure how to put it all together. Long story short, does anyone have an idea on how to take the text of a custom keyboard like "Hello from Cupertino!" and color, for example, Hello red and Cupertino blue in the preview before the message is sent? Thanks so much :)
0
0
625
Oct ’21
Xcode 13 - Swift compile error
Dear community, Yesterday I update Xcode from 12.5.1 to 13.0 and I came across a lot of compile error. Until before the update all was working great, but I suppose probably some syntax rules changes with the update for iOS 15.  .background(Color.systemBlue) error: Type 'Color' has no member 'systemBlue'  .maxWidth(.infinity) error: Cannot infer contextual base in reference to member 'infinity' Value of type 'Image' has no member 'maxWidth' .aspectRatio(contentMode: .fit) error: Cannot infer contextual base in reference to member 'fit'  Image(.system("line.horizontal.3.circle.fill")) error: Type 'String' has no member 'system' .font(.largeTitle, weight: .bold) errors: - Cannot infer contextual base in reference to member 'bold' - Extra argument 'weight' in call  Image(section.logo) .resizable() .height(32) error: Value of type 'Image' has no member 'height' Command CompileSwift failed with a nonzero exit code I hope that this one will fix by itself Basically I got 23 errors... and the code before yesterday was working great. Thanks to those who will help me, hoping it will be useful to other users, Martin
2
0
3.2k
Oct ’21
Screen becomes unresponsive during game
Hello! I am having trouble with my quiz game - sometimes (not always) after completing a level, the screen darkens and the game becomes unresponsive. I am unable to click anywhere on the screen. I've been scratching my head about this issue for several weeks now and can't get to the bottom of it. I'd really appreciate some help/advice on the matter if anyone knows that's wrong. I've attached the error log as it was too long to add here. Many thanks, Ermes Error log:
1
0
2.0k
Sep ’21
New York font optical size ranges
Hi, I'm a developer working on a plugin that maps the tracking values based on font size in Figma (design tool). I want to support the New York font, however I realize there are 4 optical sizes: Small, Medium, Large, and Extra Large. Is there a documentation that outlines which font sizes are mapped to which variation when rendered on iOS? I'm assuming it's similar to how SF Pro Display is used at size 20 instead of SF Pro Text. Knowing the mapping will help designers see a more accurate representation of the text in Figma. Thanks.
0
1
999
Aug ’21
Animate sizeToFit
I change the text of a label dynamically (so I do not know the text of the label) how can I animate the size to fit. I am looking for a smooth, elegant transition for design purposes. What I have tried:         NSAnimationContext.runAnimationGroup({ (context) in             context.duration = 4.0 label1.stringValue = "long, long text"             label1.animator().sizeToFit()         })
5
0
1.7k
Aug ’21
SF Symbols palette colors not rendering when used in drawRect (beta 5)
The new SF Symbols palette color feature was working perfectly for me in beta 4, but as soon as I installed beta 5 all my symbols started rendering in a single color. After some debugging, I realized that this is only happening when the image is created via drawRect. Hopefully this is just a minor bug that will be fixed in the next beta, as I just spent an entire week moving everything over to custom symbols (and I have to render them via drawRect)...
3
0
1.3k
Aug ’21
SwiftUI: Losing animation when passing actions into a subview.
I have created the main view of my app and there is a button that will display a pop-up view doing some user input tasks. I would like the background dim view to fade in and fade out while the pop-up view is using scale animation in transition. The animation works pretty well while showing the view, but it does not work when it disappears. Following is my code that is relative to this problem. There is a button in the main view that will toggle isAddViewShown to display the pop-up view, and there are two buttons that will close it. So I passed the action into the pop-up view as shown, but it did not work. I'm pretty new to SwiftUI so I'm not sure whether that is what I'm supposed to do. Is there any way to let the animation work as designed? public struct SMMainView: View { @State private var isAddViewShown: Bool = false public var body: some View { ZStack { /* Some other views */ // This is actually a dim view using opacity animation in transition if isAddViewShown { Color.black.opacity(0.5) } // This is a customized pop-up view using scale animation in transition if isAddViewShown { SMAddView(onCreate: { name, description in /* do some extra operations with name and description */ withAnimation(.easeInOut(duration: 0.25)) { isAddViewShown.toggle() } }, onClose: { withAnimation(.easeInOut(duration: 0.25)) { isAddViewShown.toggle() } }) .transition(.scale) } } } } To avoid misunderstanding, the following is basically what I put for the pop-up view. struct SMAddView: View { @State private var name: String = "Title" @State private var description: String = "Please Enter description." private var createAction: (String, String) -> Void private var closeAction: () -> Void var body: some View { VStack { TextField("", text: $name) TextEditor(text: $description) Button(action: { createAction(name, description) name = "Title" description = "Please enter description." }) { Text("Create") } Button(action: { closeAction() name = "Title" description = "Please enter description." }) { Image(systemName: "xmark.circle") } } } init(onCreate create: @escaping (String, String) -> Void, onClose close: @escaping () -> Void) { createAction = create closeAction = close } }
Replies
0
Boosts
0
Views
1.4k
Activity
Apr ’22
App Icon Maker
Hi community, I want to share with you this small utility to resize your App Icons according to the Apple Human Interface Guideline. I created this a long time ago for personal use and now I want to make it public. Hope you can find it useful, it's simple but it is a time saver. https://appiconmaker.bateriasincluidas.com/ Cheers!
Replies
0
Boosts
0
Views
636
Activity
Apr ’22
Menu/Sidebar List Selection Background Specifications
I've searched all over and I am having trouble finding the menu/sidebar list selection background specifications. Dark Mode Sidebar Focused Light Mode Sidebar Focused Dark Mode Sidebar Unfocused Light Mode Sidebar Unfocused Dark Mode Menu Light Mode Menu It is not a solid blue background. It is a combination of blend modes and opacities that differ in light and dark mode that I would like specifics on because I am having to create something custom and I'd like it to match the rest of my application I am working on. Is there perhaps a variable that applies this background that I am not finding? You can find more information for our usage of this in our discussion here. I found some things but I do not know how accurate they are. Any help on this would be great. Thanks!
Replies
0
Boosts
0
Views
617
Activity
Mar ’22
What to use for animating app for iOS
What animation program do most developers or designers use for adding animations to their apps? I am a graphic/UI designer and have been working with XCode lately to develop an app. I would like to add animations to buttons, menus, and even full blown instructional animations for the user on how to use our products. I have used CoreAnimator, Adobe Animate and struggled with both. Adobe animate has issues with sizing for different devices and I have been working with them for months now trying to resolve the issue as it doesn't seem to be the constraints in Xcode. I am not the best at coding but I am willing to learn. Do I need to learn Core Animation code to be able to animate buttons menus etc? Or are libraries easier? As for the full blown instructional animations I feel like that would be more a long the lines of something similar to Adobe Animate? TIA!
Replies
3
Boosts
0
Views
2.4k
Activity
Mar ’22
"on screen"-homebutton overlaps layout of our app
Hello, I m one of the developers of the My CM app team (Belgian Health Insurance company). While testing on apple devices that have no physical homebutton, but the on-screen "black bar" we notice some strange behaviour. See picture attached. The phone on the left is a iPhone 13 Pro Max, the one on the right is an iPhone XR. Both have ios 15.2. Both phones have the same build of our app. On the Pro Max the black bar is on top of our layout, on the XR our layout seems to be pushed up a bit. The desired behaviour is the behaviour on the XR. Can somebody give us advice on how to handle this issue? Kind regards, Lode
Replies
1
Boosts
0
Views
760
Activity
Mar ’22
How is a toast shaped photo frame made?
How is a toast shaped photo frame made? There's a demo?
Replies
0
Boosts
0
Views
849
Activity
Jan ’22
Degrees of Gray on iOS APPS
Hi so based on Apple UIG I should use degrees of transparency to get degrees of gray ? So to apply that on a label for example or text I make them black color then apply transparency on the control element it self ? kindest Regards
Replies
1
Boosts
0
Views
1k
Activity
Jan ’22
Graphics problem under Monterey (Intel Iris 1536 MB chip)
Hello, I have a graphics problem with Monterey on my Mac mini end of 2014 ( Graphics problem under Monterey (Intel Iris 1536 MB chip). The edges of the Dock and the Control Panel appearing full of artifact, like plastic cut with scissors or torn. My Mac being compatible it's strange and ugly. I should mention that other users with other Macs using this chip have the same problem.
Replies
0
Boosts
0
Views
631
Activity
Jan ’22
Animation in Swift iOS
Hi, I want to add some animations in my quiz module in an app. Animations like bow arrow, floating balloons, etc. In bow arrow the arrow will hit the target on tap. How can I achieve these animations in swift? Thanks in advance.
Replies
0
Boosts
0
Views
1.1k
Activity
Jan ’22
tvOS 14 UIBlurEffect crash
I have in my project different code which is responsible for the blur effect in my app. In tvOS 13 this worked fine but in tvOS 14 I have to remove the code otherwise the app will crash. What exactly do I have to change in the code to make it run on tvOS 14. Thanks for the help. private func sharedSetup(effect: UIBlurEffect, radius: CGFloat = 90) {			 let UICustomBlurEffect = NSClassFromString("_UICustomBlurEffect") as! UIBlurEffect.Type let raw = effect.value(forKey: "_style") as! Int let style = UIBlurEffect.Style(rawValue: raw)! let effect = UICustomBlurEffect.init(style: style)						 effect.setValue(1.0, forKey: "scale")		 effect.setValue(radius, forKey: "blurRadius")			 effect.setValue(UIColor.clear, forKey: "colorTint") self.blurEffect = effect	 }
Replies
2
Boosts
0
Views
1.8k
Activity
Jan ’22
Go outside of the view with an animation
Hello everyone . I have a button which is in a stack view. When my button is tapped it animates but it doesn’t perform the animation completely because it goes outside the stack view. Do you have any suggestions on how i can go outside my view with my animation? Also i am not able to get rid of the stack view. Thank you!!
Replies
0
Boosts
0
Views
887
Activity
Dec ’21
Adobe XD Production Templates for iOS and iPadOS
Is the fault on my side or is it possible that the Apple app icon grid is not aligned to the pixel grid?
Replies
0
Boosts
0
Views
986
Activity
Dec ’21
App screenshots in the Display P3 color space
Can you submit the app screenshots in the Display P3 color space? Will they be displayed correctly on the App Store? It is aberrant not to find this info in the documentation. The guidelines for the App of the Day and Feature Story cards are just as vague, only the resolution is specified. However, the provided templates are sRGB. This old post got me worried: https://stackoverflow.com/questions/54809327/appstore-connect-displayed-screenshots-wrong-colorspace
Replies
0
Boosts
0
Views
893
Activity
Dec ’21
iOS 15 beta 2 UItableviewcell spacing issue
We are using custom UITableViewCell in UITableview. While we testing our application on iOS15 beta 2 version, we observe extra space in between 2 UITableViewCells. Same UI is working fine on iOS 14 and below. Do we need to make any extra changes to handle this for iOS 15 or it will be fixed in next iOS 15 beta release?
Replies
5
Boosts
0
Views
8.6k
Activity
Nov ’21
MFMessageComposeViewController body text coloration
I'm working on a custom keyboard extension, and am currently a bit stuck on a feature. The goal is to color certain words that a user types in the preview of messaging apps - like how the emoji keyboard colors words orange that can be converted to emojis. My general understanding is that this is done through MFMessageComposeViewController, with the target of the coloration being the body of this object. It looks like UIApperance can be used in this case, but I'm really not sure how to put it all together. Long story short, does anyone have an idea on how to take the text of a custom keyboard like "Hello from Cupertino!" and color, for example, Hello red and Cupertino blue in the preview before the message is sent? Thanks so much :)
Replies
0
Boosts
0
Views
625
Activity
Oct ’21
Xcode 13 - Swift compile error
Dear community, Yesterday I update Xcode from 12.5.1 to 13.0 and I came across a lot of compile error. Until before the update all was working great, but I suppose probably some syntax rules changes with the update for iOS 15.  .background(Color.systemBlue) error: Type 'Color' has no member 'systemBlue'  .maxWidth(.infinity) error: Cannot infer contextual base in reference to member 'infinity' Value of type 'Image' has no member 'maxWidth' .aspectRatio(contentMode: .fit) error: Cannot infer contextual base in reference to member 'fit'  Image(.system("line.horizontal.3.circle.fill")) error: Type 'String' has no member 'system' .font(.largeTitle, weight: .bold) errors: - Cannot infer contextual base in reference to member 'bold' - Extra argument 'weight' in call  Image(section.logo) .resizable() .height(32) error: Value of type 'Image' has no member 'height' Command CompileSwift failed with a nonzero exit code I hope that this one will fix by itself Basically I got 23 errors... and the code before yesterday was working great. Thanks to those who will help me, hoping it will be useful to other users, Martin
Replies
2
Boosts
0
Views
3.2k
Activity
Oct ’21
Screen becomes unresponsive during game
Hello! I am having trouble with my quiz game - sometimes (not always) after completing a level, the screen darkens and the game becomes unresponsive. I am unable to click anywhere on the screen. I've been scratching my head about this issue for several weeks now and can't get to the bottom of it. I'd really appreciate some help/advice on the matter if anyone knows that's wrong. I've attached the error log as it was too long to add here. Many thanks, Ermes Error log:
Replies
1
Boosts
0
Views
2.0k
Activity
Sep ’21
New York font optical size ranges
Hi, I'm a developer working on a plugin that maps the tracking values based on font size in Figma (design tool). I want to support the New York font, however I realize there are 4 optical sizes: Small, Medium, Large, and Extra Large. Is there a documentation that outlines which font sizes are mapped to which variation when rendered on iOS? I'm assuming it's similar to how SF Pro Display is used at size 20 instead of SF Pro Text. Knowing the mapping will help designers see a more accurate representation of the text in Figma. Thanks.
Replies
0
Boosts
1
Views
999
Activity
Aug ’21
Animate sizeToFit
I change the text of a label dynamically (so I do not know the text of the label) how can I animate the size to fit. I am looking for a smooth, elegant transition for design purposes. What I have tried:         NSAnimationContext.runAnimationGroup({ (context) in             context.duration = 4.0 label1.stringValue = "long, long text"             label1.animator().sizeToFit()         })
Replies
5
Boosts
0
Views
1.7k
Activity
Aug ’21
SF Symbols palette colors not rendering when used in drawRect (beta 5)
The new SF Symbols palette color feature was working perfectly for me in beta 4, but as soon as I installed beta 5 all my symbols started rendering in a single color. After some debugging, I realized that this is only happening when the image is created via drawRect. Hopefully this is just a minor bug that will be fixed in the next beta, as I just spent an entire week moving everything over to custom symbols (and I have to render them via drawRect)...
Replies
3
Boosts
0
Views
1.3k
Activity
Aug ’21