I have an infinite week scroller implemented using a TabView's page styling. basically when you scroll to the next week, it pre-loads the week after so that you can scroll infinitely. Since iOS 17.4, it seems to partially scroll two pages ahead. Scrolling backwards works fine. I made a radar: FB13718482 Here is a simplified implementation that has the issue reproduced. It uses the swift ordered collections library. Video of the issue: https://youtu.be/JW8dHqawURA import Foundation import OrderedCollections import SwiftUI struct ContentView: View { private let calendar: Calendar private let dateFormatter: DateFormatter @State var weeks: OrderedDictionary @State var selectedWeek: WeekView.Week.ID init() { let calendar = Calendar.autoupdatingCurrent self.calendar = calendar let formatter = DateFormatter() formatter.calendar = calendar formatter.dateFormat = MMM d dateFormatter = formatter // Setup initial week let currentDate = Date() let weekIdentifier = Self.weekIdentifier(for: currentDate, calendar: calendar)
Search results for
column
2,071 results found
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hi, I wrote the code below to demonstrate an issue I cannot handle, since I am very new to swiftui struct Cell: Identifiable { var id: UUID = UUID() var i: Int = 0 init(i: Int) { self.i = i } } struct ContentView: View { var columns: [GridItem] = [GridItem](repeating: GridItem(.fixed(40), spacing: 5), count: 60) var cells: [Cell] = [] init() { cells.removeAll() for i in 0..<180 { cells.append(Cell(i:i)) } } var body: some View { ScrollView([.horizontal, .vertical]) { LazyVGrid(columns: columns, spacing: 5) { ForEach(cells) { cell in ButtonView(cell: cell) } } } } } struct ButtonView: View { var cell: Cell @State var popOver: Bool = false var body: some View { Button { popOver.toggle() } label: { Text((cell.i)) } .popover(isPresented: $popOver, content: { Text(Information line of button (cell.i)).padding() }) } } #Preview { ContentView() } Running the code above, button clicks are not always work
I'm late on this topic, but I'm stuck with the same issue here, with inline-flex. Deactivating and reactivating through the web inspector makes them appear. This problem only occurs since iOS 17.4, precisely. Also present in iOS 17.5. The code is: 我 Wǒ and the faulty CSS: .ttPhrase .ruby { display: inline-flex; flex-direction: column; justify-content: flex-end; text-align: center; } The chinese characters don't appear at first, but they appear after disabling/re-enabling the inline-flex through the web inspector.
Topic:
Safari & Web
SubTopic:
General
Tags:
As an update to @eskimo 's response, There's a few cases here: Case #1: Building for the simulator. Case #2: Building for a real device, but running on a device where the framework isn't present (eg: iPad, Mac) Case #3: Building for an iOS version before iOS 17.2 where the framework isn't available For case #1: use #if canImport(JournalingSuggestions) like this: #if canImport(JournalingSuggestions) import JournalingSuggestions #endif Then, in your code where you use JournalingSuggestionsPicker, check if you can import it first. This way, if you're not building for a real device, the framework will not be imported. For case #2: Since you're building for a real device, the framework can be imported. Since it's not an iPhone, your app will crash when run. Protect against this by first checking if you can import UIKit, then setting isJournalingSuggestionsAvailable to be true if you're on an iPhone. If you're on Mac, where UIKit can't be imported, isJournalingSuggestionsAvailable will be false anyways. For example
Topic:
App & System Services
SubTopic:
Core OS
Tags:
Hi, i want to place a object in 3d world space without the use of hittest or plane detection in ios swift code. Suggest the best method. Now, I take the camera center matrix and use simd_mul to place the object, it works but the object gets placed at the centre of the mobile screen. I want to select the x and y positino on the screen 2d coordinate and place the object. I tried using the unprojectpoint function, to get the AR scene world coordinate of the point i touch on the mobile screen. I get the x, y,z values, they are very close to the values from camera center matrix. When i try to replace the unprojectpoint values in the cameracenter matrix, i dont see a difference in the location of the placed object. The below code always place object from center screen with specified depth, But i need to place object in user specified position(x,y) of the screen with depth. 2D pixel coordinate system of the renderer to the 3D world coordinate system of the scene. /* Create a transform with a translation of 0.2 meter
Dear @darkpaw, I've done exactly what you suggested and got pretty good results from a data retrieval point of view (I'm displaying correctly the four football league days with the proper teams and results). Here below the code modification I've done: import SwiftUI struct CalendarioView: View { @State var Calendario: [CalendarioPartite] = CalendarioPartite.testCalendario() @State var stagione: String = 2023/2024 @State var totalePartite: Int = 4 private var giornate = Array(1...4) private let adaptiveColumn = [GridItem(.adaptive(minimum: 1500))] var partiteCampionato: [CalendarioPartite] { CalendarioPartite.testCalendario().filter{ $0.stagione == stagione } } var body: some View { ScrollView(.vertical) { LazyVGrid(columns: adaptiveColumn, spacing: 20) { ForEach(giornate, id:.self) { giornata in // Inizio schermata Giornata VStack { var partiteGiornata: [CalendarioPartite] { partiteCampionato.filter { $0.giornata == giornata } } Text(Giornata (giornata)) .fontWeight(/*@START_MENU_TOKEN@*/.bold/*@END_
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags:
I think the main error comes from a missing NavigationStack in RosaView. And you should have rosa In addition, I had to test on an iPad in order for Table to show columns names and all columns (see here: https://stackoverflow.com/questions/75277014/swift-table-only-show-1-column) Finally, I made a few changes before it works ok. Please test and tell if that works for you, otherwise, explain what is failing. struct Rosa: Identifiable, Codable, Hashable, Equatable { var id = UUID() let stagione: String let nomeGiocatore: String let cognomeGiocatore: String let nascitaGiocatore: String let etàGiocatore: Int let ruoloGiocatore: String init(stagione: String, nomeGiocatore: String, cognomeGiocatore: String, nascitaGiocatore: String, etàGiocatore: Int, ruoloGiocatore: String) { self.stagione = stagione self.nomeGiocatore = nomeGiocatore self.cognomeGiocatore = cognomeGiocatore self.nascitaGiocatore = nascitaGiocatore self.etàGiocatore = etàGiocatore self.ruoloGiocatore = ruoloGiocatore let
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags:
Dear all, I'm quite new to SwiftUI and I'm trying to build my first app. I have a data model file like the one below (I'm just posting a portion of it): import Foundation struct CalendarioPartite: Identifiable, Hashable, Equatable { let id = UUID() let stagione: String let giornata: Int let datapartita: String let squadracasa: String let golsquadracasa: Int let squadratrasferta: String let golsquadratrasferta: Int init(stagione: String, giornata: Int, datapartita: String, squadracasa: String, golsquadracasa: Int, squadratrasferta: String, golsquadratrasferta: Int) { self.stagione = stagione self.giornata = giornata self.datapartita = datapartita self.squadracasa = squadracasa self.golsquadracasa = golsquadracasa self.squadratrasferta = squadratrasferta self.golsquadratrasferta = golsquadratrasferta } static func testCalendario() -> [CalendarioPartite] { [CalendarioPartite(stagione: 2023/2024, giornata: 1, datapartita: 04/09/2023, squadracasa: Castelnovese Castelnuovo, golsquadracasa: 1, squadratrasferta: J
I do not believe Firefox, Google Chrome, or other Chromium-based browsers use the native macOS Game Controller framework. As such these browsers must add support for gamepads individually, and Nintendo controllers are popular enough that they get supported by all. If you are running macOS Sonoma, you can try turning on the 'Increase controller compatibility' option for your 8BitDo Ultimate 2.4G Wireless Controller. Open the system Settings app, navigate to the Game Controller settings, click on your 8BitDo Ultimate 2.4G Wireless Controller in the list, use the (+) button at the bottom of the left column to add app-specific customizations for Firefox/Chrome, and toggle ON the 'Increase controller compatibility' switch. This will result in the 8BitDo Ultimate 2.4G Wireless Controller appearing as an Xbox controller to Firefox/Chrome, if Firefox/Chrome support Xbox controllers.
Topic:
Graphics & Games
SubTopic:
GameKit
Tags:
All examples regarding SwiftUI Tables and sorting work fine, but they also have all the data available immediately. If I load the data in .task, sorting only works on the first column. Test data: struct Customer: Identifiable { let id = UUID() let name: String let email: String let creationDate: Date } func parseDate(from text: String) -> Date { let formatter = DateFormatter() formatter.dateFormat = dd/MM/yyyy return formatter.date(from: text) ?? Date() } func getTestData() -> [Customer] { return [ Customer(name: John Smith, email: john.smith@example.com, creationDate: parseDate(from: 04/11/2015)), Customer(name: Jane Doe, email: jane.doe@example.com, creationDate: parseDate(from: 29/04/2009)), Customer(name: Bob Johnson, email: bob.johnson@example.com, creationDate: parseDate(from: 01/08/2010))] } And here the view: table 1 populates the array in the initializer table 2 loads the content in .task, initially it is empty table 3 loads the content in .task, initially it contains one dummy object
I am trying to get SwiftUI views to move from one position to another using animation. I know that when the identity of the views change this often result in a fade instead of an animation but I do not believe this is happening in my case. Below is a simple example program with four views from a 2D array (the 2D array is important). There is a button to rotate the views clockwise. I tried using two ForEach blocks but I cannot use it on the outer one because the row arrays does not conform to Identifiable. I also changed my code to write out the views explicitly without the ForEach blocks but I get the same result: The column changes animate as movement but the row changes animate as fades. How do I get it to animate all four views moving clockwise? import SwiftUI struct Block: Identifiable { var id : Int = 0 } struct Board { let numRows = 2 let numCols = 2 var blocks: [[Block]] init() { blocks = Array(repeating: Array(repeating: Block(), count: numCols), count: numRows) for row in 0..
We're trying to implement a file locking mechanism to prevent multiple users from editing the same file at the same time causing conflicts. Our previous implementation worked well on Ventura, but on Sonoma, even when just previewing a file in Finder in Column View, as opposed to editing, it locks. This is the same behaviour we experienced with Apple's FruitBasket sample code. There is a isFileViewerRequest flag inside the NSFileProviderRequest object provided with the NSFileProviderReplicatedExtension enumerator function. We thought this would indicate a file being edited. After further investigation, we were told that the isFileViewerRequest flag just indicates if a file is being presented, not just edited. We find the intended behaviour a bit strange, why would anyone want an icon next to a file to indicate presented? Why is the behaviour working fine on Ventura as a locking mechanism but on Sonoma it can only be considered a presented mechanism? If the intended behaviour is to indicate a file bein
In WWDC2020, the video Synchronizing a local store to the cloud shows some data fields in the left column of the dashboard, such as CD_post, CD_Tag, where did these come from? need to create it manually on dababoard, or it synchronize from the demo app ? why do I run this corresponding demo, but there are no data fields in the dashboard of my account and my dashboard of my account is almost empty?
It would be much easier to debug if you provided your document, your explanation of what you are trying to achieve is not super clear to me. I assume you start with no data in sheet 2 and you don't care that I'm overwriting data in sheet 2 - is this true? Anyway, please go through this code and read the comments. It takes maybe 2-3 minutes on my computer to finish the script. tell application Numbers activate -- the following code is just to show you how do I think your document looks like make new document tell front document -- there should already be one sheet, let's rename it to GAMES set name of active sheet to GAMES -- create sheet TRIALS2 -- this should also create table 1 make new sheet set name of active sheet to TRIALS2 -- making sure table 1 has at least 67 rows, otherwise we cannot access row 67 if (row count of table 1 of sheet GAMES < 67) then set row count of table 1 of sheet GAMES to 67 end if -- making sure table 1 has at least 2 columns, otherwise we cannot access column
Topic:
App & System Services
SubTopic:
Automation & Scripting
Tags:
With the deprecation of the airport binary in macOS 14.4 I am re-writing my own network tool to directly use CoreWLAN. In doing this and testing and comparing to previous results from the Apple airport binary under various versions of macOS I believe CoreWLAN has a 'bug' which as a result was exhibited in the Apple airport binary and equally my own code. As detailed below. This applies to the release version of macOS 14.4 (23E214) macOS Sonoma 14.3.1 and previous versions of macOS going back many, many years have included an official Apple binary at the following location. /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport Whilst this is now officially deprecated in macOS 14.4 it is obvious that this tool will have itself been utilising the official Apple framework CoreWLAN. As part of the process of re-writing my own tool which formerly used the above Apple binary, I have re-written my tool to directly utilise CoreWLAN myself via the Objc interface. In doing this I have been