Hello Everyone,
I am developing a iOS app on Xcode. The issue which I am facing is that my app user interface looks different on the Xcode simultor / preview when compared the my real iPhone.
Take a look yourself -
Xcode simulator / preview:
Real iPhone:
Even though they running the same code and same device (simulator iPhone 13 Pro and real physical iPhone 13 Pro), the user interface looks different.
Here is the UI code:
import SwiftUI
struct ScreenView: View {
var body: some View {
NavigationView {
ZStack {
Color("Colorbg").edgesIgnoringSafeArea(.all)
VStack {
Image("testim")
.resizable()
.aspectRatio(contentMode: .fit)
Spacer()
NavigationLink(destination: ScreenView1.navigationBarHidden(true)) {
Label("Test 1", systemImage: "play.fill")
.foregroundColor(Color.white)
.font(.system(size: 57.5))
.padding(.all)
.background(Color("Colorbutton"))
.cornerRadius(20)
}
Spacer()
Label(" Test 2 ", systemImage: "play.fill")
.foregroundColor(Color.white)
.font(.system(size: 57.5))
.padding(.all)
.background(Color("Colorbutton"))
.cornerRadius(20)
.labelStyle(.titleOnly)
Spacer()
Label(" Test 3 ", systemImage: "play.fill")
.foregroundColor(Color.white)
.font(.system(size: 57.5))
.padding(.all)
.background(Color("Colorbutton"))
.cornerRadius(20)
.labelStyle(.titleOnly)
Spacer()
HStack {
NavigationLink(destination: Home().navigationBarHidden(true), label: {
Label("Home", systemImage: "house.fill")
.foregroundColor(Color.white)
.font(.system(size: 50))
.padding()
.background(Color("Colorbutton"))
.cornerRadius(30)
.labelStyle(.iconOnly)
})
Spacer()
}.padding(.leading)
Spacer()
}
}
}
}
}
struct ScreenView_Previews: PreviewProvider {
static var previews: some View {
ScreenView()
}
}
How can I fix this issue?
Post not yet marked as solved
I'm designing Panoramic App Store preview screenshots with Sketch. I would want to know the gap between two Artboards for iPhone 6.5", iPhone 5.5", iPad Pro (3rd Gen) 12.9" and iPad Pro (2nd Gen) 12.9".
Post not yet marked as solved
Sono Alexander Puglisi ho 19 anni e desidero creare un app che permetta di fare soldini grazie al nostro apple watch, e infine creare una lentina a contatto che permetta di vedere qualcosa in più (esempio: penna e luce uv su foglio bianco) ,, (qualcosa che gli altri non riescono a vedere). (alla fine le lenti a contatto le usano anche per scene teatrali/film ,quindi perchè non sfruttare questa cosa? non lo so...potrebbe secondo voi servire ? )
qualcuno può contattarmi ? +39 3273529673
scusate per il disturbo ma sto uscendo pazzo :(
Post not yet marked as solved
I would like to have a fullscreen "view" that slides up from the bottom after a user action, and that can be swiped down smoothly like a "sheet".
I understand that there are sheets that are swipable, but dont really cover the fullscreen, and then that there is fullscreencover which does cover the full screen but is not swipable.
In apple music, whenever you click on a song, a fullscreen "modal" slides up from the bottom, and is swipable. How can I achieve that. I'm guessing if apple does it on their apps, they allow users to have the possibility to achieve the same results.
Post not yet marked as solved
Hello! I am trying to learn to make apps with Swift Playgrounds and Swift UI. The devices I own include an iPad Air 4 running iPadOS 15, M1 Mac Mini running macOS Monterey, iPhone 13 running iOS 15, and an Apple Watch Series 4 running WatchOS 8. I plan to update all of these devices to the next-gen public betas as they release.
Ive completed the “Getting Started with Apps” course on Swift Playgrounds on my iPad.
does anyone have any tips on starting from scratch, or know how I can learn more and sharpen my skills?
thank you!
Post not yet marked as solved
I just finished the video regarding the new Expanded/Condensed SF font variants. I was trying to work out how to use them in my apps, but can't seem to find them anywhere. I'd have guessed they would be in the SwiftUI's Font element as a new .design option, but I didn't see them. Has anyone found them yet, or are they not in the first beta?
Post not yet marked as solved
I created two apps with the same code, one for Android and one for IOS, After 3 - 4 months. Now my app is not working, I'm unable to log in to my app. It only takes one character. Kindly help me regarding this. If I'm trying to install my application on a fresh iPhone, then it works fine.
Post not yet marked as solved
Can't seem to find what kind of component this is in Apple HIG. Would appreciate the answers!
Post not yet marked as solved
A type of question I see often is "which UI framework is best? SwitUI, UIKit, AppKit, etc?"
And the answer is, of course, usually "it depends" or "a mix, depending on what you need".
I wanted to re-frame that question with specific parameters.
Let's say you were writing Apple Photos for the Mac from the ground up, starting today. For the sake of discussion, it's going to be functionally identical to the Photos app that exists on the Mac today. Which means it:
looks and feels like a true, native macOS app
should be very performant in terms of rendering and scrolling through a library that may contain hundreds of thousands of photos
maintains a large database which can be synced over iCloud
etc
When you go to write that first line of UI code, which UI framework are you reaching for, and why? If more than one, which ones would you use for each piece, and why?
Especially interested to hear any viewpoints from Apple folks in this thought exercise!
Post not yet marked as solved
The canlender widget shown in 14:06 is in Japanese instead of Chinese.
Post not yet marked as solved
Hey devs! i would like to know if the new UI finally will be different o r is the same.
Thank you,
Shirley B.
Post not yet marked as solved
Hi,
I am trying to use a form for a username/password login screen
By default, the form aligns to the top of the screen, but I want it center aligned vertically and horizontally.
Any ideas on how to do that?
This is how it looks right now
I want this form center aligned vertically on the screen
Post not yet marked as solved
Hi!
I am working on the UI/UX project for Apple apps(iPhone/watchOS etc.) using FIGMA.
I don't have any Apple device from where I could use 'SF Font' family natively. I have tried the alternative fonts but none of them appealed to me and my client too.
I also downloaded their resources but still it changes the file after I edit the text.
Thanks in Advance.
Post not yet marked as solved
I downloaded the macOS 12 App Icon Photoshop Template here: https://developer.apple.com/design/resources/ and when I modify the larger size that I need, changes are not showing on the other sizes. I downloaded the iOS template and the macOS template for Sketch and those work, but not Photoshop template.
Post not yet marked as solved
Hello Devs and Support,
I am a new developer with a challenge to build a MacOS app that captures preliminary data from clients (text, signatures, jpgs and pdfs) and then pulls that data into a database where a secondary app automatically extracts the data into a word document template.
I have been researching to find documentation and support on how to implement this using SwiftUI and have only managed to build a basic content view:
// ContentView.swift
// Client Form
//
// Created by Andrew Duncan Poole on 2022/05/10.
//
import SwiftUI
struct ContentView: View {
@State var firstName = ""
@State var lastName = ""
@State var companyName = ""
@State var isExchange: Bool = true
@State var description = "This book is about .."
@State var price = ""
@State private var scrollViewContentSize: CGSize = .zero
@State private var categoryIndex = 0
var categorySelection = ["Action", "classic","Comic Book","Fantasy","Historical","Literary Fiction","Biographies","Essays"]
var body: some View {
ScrollView(.horizontal, showsIndicators: true) {
HStack (spacing: 1) {
Form {
Section(header: Text("CE Technical File Preliminary Data")) {
TextField("First Name", text: $firstName)
TextField("Last Name", text: $lastName)
TextField("Company Name", text: $companyName)
Toggle(isOn: $isExchange) {
Text("I'm interested in an exhange")
}
.frame(width: 650)
}
Section() {
Picker(selection: $categoryIndex, label: Text("Categorie")) {
ForEach(0 ..< categorySelection.count) {
Text(self.categorySelection[$0])
}
}
}
Section(header: Text("Description")) {
TextEditor(text: $description)
}
Section {
Button(action: {
print("submitted ..")
}) {
Text("Publish now")
}
}
}
}.navigationTitle("Simplimedica Client Form")
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
}
Is there anyone who can PLEASE advise where I can find further assistance be it tutorials or sample code for this...
I have a standard UITableViewController and I have added an MKMapKit map neatly on the top half of the screen (and the table in the bottom half).
During runtime, if we scroll through the table records, the map scrolls up as well.
What I wanted to do was have the map static, not scrolling, while I scroll the table.
Any ideas on how to accomplish this, please?
Post not yet marked as solved
I’ve an UIAlertController to allow blocking an user from my app, and another one to report them with a bunch of reasons.
However I can’t decide which UIAlertController.Style to use.
Report action contains a 5 reasons to report, plus the cancel action. If you choose the Other reason, you get a third alert with a text field to fill in the reason. Then there is the block alert with a simple Yes/No choice.
Report alert then/or Block alert both come from UIMenu actions in a navigation bar’s UIBarButtonItem.
Following the Apple human guidelines, I should:
Use an action sheet — not an alert — to offer choices related to an intentional action.
So it seems pretty clear that I should use the action sheet style for the first Report alert, as it’s intentional and contains more than 2 actions.
But then I have to use an alert style if the user uses the Other option and has to write their reason.
And what about the Block alert than comes next in any case or from a dedicated action in the UIMenu?
To sum up:
UIBarButtonItem -> UIMenu -> Report & Block UIActions -> 5 Report reasons / Yes or No for Block
Block handler can be independent, but it is also called if any report reason is selected
If Other report reason is selected, an alert with text field is initially shown to specify the reason
I’m confused, which style should I use for all 3 of them?
Post not yet marked as solved
I have collection view inside tableview cell the problem is when I change semanticContentview of the collection view
the collection view for the first time not taking the full width of the screen for the first cell only as below:
and this for foreceLeftToRight:
here is the code in my tableview cell
var width:CGFloat!{didSet{
if let flowLayout = collectionView.collectionViewLayout as? UICollectionViewFlowLayout{
flowLayout.estimatedItemSize = CGSize(width: width-10, height: 300)
flowLayout.scrollDirection = .horizontal
flowLayout.minimumInteritemSpacing = 10
flowLayout.minimumLineSpacing = 10
flowLayout.collectionView?.translatesAutoresizingMaskIntoConstraints = false
flowLayout.sectionInset = UIEdgeInsets(top: 0, left: 5, bottom: 0, right: 5)
flowLayout.collectionView?.clipsToBounds = false
}
}}
override func awakeFromNib() {
super.awakeFromNib()
initXib()
collectionView.delegate = self
collectionView.dataSource = self
collectionView.isPagingEnabled = true
collectionView.semanticContentAttribute = .forceRightToLeft
}
Post not yet marked as solved
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!