I have an iPhone 11 (MWJE2LL/A) for personal and development use. When I upgraded it to iOS 17.2.1 it stopped sync'ing to my computers. I can't sync or restore the iPhone. Both Finder and Music show the iPhone in the left column, but time out after 60 secs of Loading..., finally stating: The selected device could not be found. Xcode also does not see the connected iPhone, and does not list it in the available iOS build destinations. I have tried sync'ing using numerous Apple USB cables and computers (Mac Pro, 16 MacBook Pro, Mac Studio) all running macOS Sonoma 14.1. Is this a known bug in iOS 17.2? Is there a workaround so I can restore the iPhone and continue development work?
Search results for
column
2,071 results found
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
It looks like there's a new tab bar / column style design for tvOS that was introduced with the current TV app. Is there any word on this being a developer available component?
Hi all, I am new to Swift and I have found an issue which I can't fix. I use a TabView and if I change the views a few times, and go back to this view I get this error and I can't tab on any of the views any longer in the Navigation Stack. The way to fix it, is to force close the app and reopen it. Error message: A NavigationLink is presenting a value of type “NavigationItem” but there is no matching navigationDestination declaration visible from the location of the link. The link cannot be activated. Note: Links search for destinations in any surrounding NavigationStack, then within the same column of a NavigationSplitView. Code: struct ToolsMainView: View { @State private var navigationPath = NavigationPath() var body: some View { NavigationStack(path: $navigationPath) { VStack { ScrollView(showsIndicators: false) { VStack { ForEach(navigationItems) { item in NavigationLink(value: item) { HStack(alignment: .center, spacing: 12) { Image(systemName: item.icon) Text(item.title) Spacer() Image(systemNa
Hi. I'm glad you asked this because I'm constantly tripping over SwiftUI syntax myself. There are a bunch of ways to express the contents of your NavigationSplitView. Note that SwiftUI is not Swift. It looks like Swift, it is written in Swift, but it is a domain specific language for creating descriptions of user interfaces. It extends the Swift language. If you look at the documentation for NavigationSplitView in Xcode's Documentation viewer, you'll find struct NavigationSplitView where Sidebar : View, Content : View, Detail: View and if you click on View, you'll find that it is a protocol. The initializer you are using is the one which creates a two-column view, with no control over the visibility of the columns public init(@ViewBuilder sidebar: () -> Sidebar, @ViewBuilder detail: () -> Detail) where Content == EmptyView The parameters (labelled sidebar and detail here) are closures - functions returning structs conforming to the View protocol. my SidebarView and DetailView are Views
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags:
HStack { ForEach(days, id:.self) { day in Text(day) .font(.system(size: 12, weight: .medium)) .frame(maxWidth: .infinity) } } LazyVGrid(columns: Array(repeating: GridItem(.flexible()), count: 7), spacing: 20) { ForEach(fetchDates()) { value in ZStack { if value.day != -1 { let hasAppts = manager.days.contains(value.date.monthDayYearFormat()) NavigationLink(value: AppRouter.day(date: value.date)) { Text((value.day)) .foregroundColor(hasAppts ? .blue : .black) .fontWeight(hasAppts ? .bold : .none) .background { ZStack(alignment: .bottom) { Circle() .frame(width: 48, height: 48) .foregroundColor(hasAppts ? .blue.opacity(0.1) : .clear) if value.date.monthDayYearFormat() == Date().monthDayYearFormat() { Circle() .frame(width: 8, height: 8) .foregroundColor(hasAppts ? .blue : .gray) } } } } .disabled(!hasAppts) } else { Text() } } .frame(width: 32, height: 32) } } } .padding() }
I embedded a vertical scrollview to a calendar that was originally horizontally navigation with buttons. But its isn't scrolling changing months. What am I missing? let days = [SUN, MON, TUE, WED, THU, FRI, SAT] @State private var selectedMonth = 0 @State private var selectedDate = Date() @State private var path = NavigationPath() var body: some View { NavigationStack(path: $path) { ScrollView { VStack { Rectangle() .frame(height: 1) .foregroundColor(.gray) VStack(spacing: 20) { // Month Selection HStack { Spacer() Button { withAnimation { selectedMonth -= 1 } } label: { Image(systemName: lessthan.circle.fill) .resizable() .scaledToFit() .frame(width: 32, height: 32) .foregroundColor(.gray) } Spacer() Text(selectedDate.monthYearFormat()) .font(.title2) Spacer() Button { withAnimation { selectedMonth += 1 } } label: { Image(systemName: greaterthan.circle.fill) .resizable() .scaledToFit() .frame(width: 32, height: 32) .foregroundColor(.gray) } Spacer() } HStack { ForEach(days, id:.self) { day in Text(day) .font
I've finally initialized the DataFrame like this var trainingData: DataFrame = [keywords : data.trainingKeywords, target: data.trainingTargets] but now i'm getting this error when creating my data model like this: let model = try MLLinearRegressor(trainingData: trainingData, targetColumn: target) CreateML Type Error: Column keywords has element of unsupported type Any. Any idea from there on?
Topic:
Machine Learning & AI
SubTopic:
Core ML
Tags:
Hi, I've tried to find a solution for this problem for weeks now but it seems no one knows how to solve it and Apple doesn't seem to care. I have a NavigationSplitView with two columns. In the detail column I have a button - or any other clickable control - which is placed in the very top where usually the safe area resides. The button is NOT clickable when he is in the safe area and I have NO idea why. I know I can place buttons in safe areas of other views and they are clickable. Please have a look at the code: `struct NavTestView: View { var body: some View { GeometryReader { p in VStack(spacing: 0) { NavigationSplitView { List(names) { Text($0.name).frame(width: p.size.width) .background(Color.green) }.listRowSpacing(p.size.height * 0.15 / 100 ) .toolbar(.hidden, for: .navigationBar) } detail: { TestView().ignoresSafeArea() }.frame(width: p.size.width, height: p.size.height, alignment: .topLeading) .background(Color.yellow) } } } } struct TestView: View { var body: some View { GeometryRe
I'm creating a view which is scrollable and has Vstack which include tabView what I'm facing that when I added the TabView in Vstack , it's vanished unless I specify the height for the TabView and when I specify the height of the tabview any lazy view inside it , it loose it's laziness because I already specify the height which means it render all it's content in advance . BTW I have to use tabview because I need the paging effect : here's the full code ScrollView{ LazyVStack{ Text(hello) TabView(selection: $selectedIndex){ LazyVGrid(columns: columns2) { ForEach(myItems.indices, id: .self) { item in Color.green .frame(height: 150) .overlay { Text((item.description)) .foregroundStyle(Color.black) .font(.largeTitle) } } .tag(0) } }.frame(minHeight: 100) // if I removed this line the tabview will disappear // and if I specify a big number the lazyVgrid is no longer lazy } }
I'm following Apple WWDC video (https://developer.apple.com/videos/play/wwdc2021/10037/) about how to create a recommendation model. But I'm getting this error when I run the project on that like of code from their tutorial. Column keywords has element of unsupported type Dictionary. Here is the block of code took from the transcript of WWDC video that cause me issue: func featuresFromMealAndKeywords(meal: String, keywords: [String]) -> [String: Double] { // Capture interactions between content (the dish keywords) and context (meal) by // adding a copy of each keyword modified to include the meal. let featureNames = keywords + keywords.map { meal + : + $0 } // For each keyword, create an entry in a dictionary of features with a value of 1.0. return featureNames.reduce(into: [:]) { features, name in features[name] = 1.0 } } var trainingKeywords: [[String: Double]] = [] var trainingTargets: [Double] = [] for item in userPurchasedItems { // Add in the positive example. trainingKeywords.append( featur
You can remove the toggle to show and hide the column with .toolbar(removing: .sidebarToggle) - https://developer.apple.com/documentation/swiftui/view/toolbar(removing:) For the back button, if you're navigating to a detail view, you can use .navigationBarBackButtonHidden() - https://developer.apple.com/documentation/swiftui/view/navigationbarbackbuttonhidden(_:) - on the detail view to hide the back button
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags:
It seems to me that you shouldn't really be using the same key for both of these localized strings, since they are used in different places. Even if the localized strings come out the same in general, it's a risky assumption that the different UI contexts (column titles and button titles in your example) won't require different strings for some languages. For example, in some languages the string might need to be capitalized differently in these 2 places. If you really do want to use the exact same localized string in both places, I'd recommend that you use the same comment everywhere in your source code, describing both intended uses. If you fully specify the comment this way, you avoid confusion for the translator too. Otherwise, you should use a unique string at each call site, such as Something-List-Title and Something-Button-Title, and use the comments to clarify exactly what needs to be localized. I also recommend that you use Feedback Assistant to submit a enhancement request for (say) a way o
Topic:
Accessibility & Inclusion
SubTopic:
General
Tags:
I'm creating a view by reading several json files at once. I'm reading 6 files from indexes 0 to 5 and displaying each view. Until the day before yesterday, only the view of index 0 was executed and the rest of the errors appeared, but I didn't correct anything, but the file in index 1 starts to read, and from 2 the same error appears. In my json file, there is no '/' in row 1 of column 1, but there is a '/' in row 1 of column 1, so I think they say that they can't read it as a json file [ { name: recipe1, id: 1001, description: 1, imageName: Recipe01 }, { name: recipe2, id: 1002, description: 2, imageName: Recipe01 }, { name: recipe3, id: 1003, description: 3, imageName: Recipe01 }, { name: recipe4, id: 1004, description: 4, imageName: Recipe01 }, { name: recipe5, id: 1005, description: 5, imageName: Recipe01 }, { name: recipe6, id: 1006, description: 6, imageName: Recip01 }, { name: recipe7, id: 1007, description: 7, imageName: Recip01 } ]
Hello, I migrated a project to use String Catalogs (Localizable.xcstrings) instead of Localized.strings and Localized.stringsdict files. So far so good, but since I use a lot localized strings in my project, there are quite some localizations used more than once in different contexts and thus with different comments. For example: Source file 1: String(localized: Something, comment: Button title for context1) Source file 2: String(localized: Something, comment: Column title for context2) This results to a Localized.xcstrings file with this content: { sourceLanguage : en, strings : { Something : { comment : Column title for context2nButton title for context1 } }, version : 1.0 } The main problem with this is, that the order of the concatenated comment changes randomly during each build. After the next Xcode build (without any code changes), the same Localized.xcstrings file might look like this: { sourceLanguage : en, strings : { Something : { comment : Button title for context1nColumn title f
Overview I'm facing an issue where the MacOS Toolbar shows overall inconsistent behavior when switching from 3 columns to 2 columns NavigationSplitViews. I'd like to know if this is somehow expected or possible fixes for this issue. Details I'm using the code available at this WWDC22 session to reproduce the issue: https://developer.apple.com/documentation/swiftui/bringing_robust_navigation_structure_to_your_swiftui_app This same inconsistent behavior is also appearing on another project. Steps to reproduce: Open the application and select the 3 columns option Select any item on the sidebar. Notice how the toolbar is displayed. There is no divider and the primary action placement on the far-right of the Toolbar. Click on it and select now 2 columns. Notice how the toolbar is displayed. Now the primary action is no longer on the far right of the toolbar, but on the right of what would be the content view. Besides that, a divider is now appearing. Click again on the wand and