Search results for

column

2,061 results found

Post

Replies

Boosts

Views

Activity

Reply to [bug report] Unicode characters with "variation selectors" are not rendered in the iPhone Safari browser (webkit) with iOS 17.3
This isn't working for the Variation Selector-15 (U+FE0E) for all the characters. Can you please apply that variation selector to all your Unicode characters? I) Steps to reproduce the issue: navigate in safari to the page https://eurovot.com/vs.htm II) Expected result: as the 1st column of characters have the Variation Selector-15 (U+FE0E) applied, and the 2nd column have the Variation Selector-16 (U+FE0F) applied, the first column should always display orange characters and the second column emoji characters. III) Error result: some characters are working fine in the 1st column and displayed as text in orange colour, but some other aren't displayed as text, but displayed as emojis instead.
Topic: Safari & Web SubTopic: General Tags:
Apr ’24
jax.numpy.insert returning incorrect results wen jitted
Hi, I just noticed that using the jax.numpy.insert() function returns an incorrect result (zero-padding the array) when compiled with jax.jit. When not jitted, the results are correct Config: M1 Pro Macbook Pro 2021 python 3.12.3 ; jax-metal 0.0.6 ; jax 0.4.26 ; jaxlib 0.4.23 MWE: import jax import jax.numpy as jnp x = jnp.arange(20).reshape(5, 4) print(f{x=}n) def return_arr_with_ins(arr, ins): return jnp.insert(arr, 2, ins, axis=1) x2 = return_arr_with_ins(x, 99) print(f{x2=}n) return_arr_with_ins_jit = jax.jit(return_arr_with_ins) x3 = return_arr_with_ins_jit(x, 99) print(f{x3=}n) Output: x2 (computed with the non-jitted function) is correct; x3 just has zero-padding instead of a column of 99 x=Array([[ 0, 1, 2, 3], [ 4, 5, 6, 7], [ 8, 9, 10, 11], [12, 13, 14, 15], [16, 17, 18, 19]], dtype=int32) x2=Array([[ 0, 1, 99, 2, 3], [ 4, 5, 99, 6, 7], [ 8, 9, 99, 10, 11], [12, 13, 99, 14, 15], [16, 17, 99, 18, 19]], dtype=int32) x3=Array([[ 0, 1, 2, 3, 0], [ 4, 5, 6, 7, 0], [ 8, 9, 10, 11, 0], [12, 13, 14
0
0
698
Apr ’24
Shopping cart count disappears after changing tabs
On my shop and content views of my app, I have a shopping cart SF symbol that I've modified with a conditional to show the number of items in the cart if the number of items is above zero. However, whenever I change tabs and back again, that icon disappears even though there should be an item in the cart. I have a video of the error, but I have no idea how to post it. Here is some of the code, let me know if you need to see more of it: CartManager.swift import Foundation import SwiftUI @Observable class CartManager { /*private(set)*/ var products: [Product] = [] private(set) var total: Int = 0 private(set) var numberofproducts: Int = 0 func count() -> Int { numberofproducts = products.count return numberofproducts } func addToCart(product: Product) { products.append(product) total += product.price numberofproducts = products.count } func removeFromCart(product: Product) { products = products.filter { $0.id != product.id } total -= product.price numberofproducts = products.count } } ShopPage.swift import Sw
4
0
1k
Apr ’24
TabView's page style is broken on iOS 17.4
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)
1
0
536
Apr ’24
Fixing offset in two axis ScrollView
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
3
0
427
Apr ’24
Reply to iOS 17.0 Webkit 'display:flex' issue
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:
Apr ’24
Reply to iPad attempting to import Journaling Suggestions
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:
Apr ’24
Placing object in AR without hittest or plane
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
0
0
832
Apr ’24
Reply to Football League calendar display view
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:
Apr ’24
Reply to Failed to product diagnostic error
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:
Apr ’24
Football League calendar display view
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
3
0
716
Apr ’24
Reply to Compatibility Inquiry: 8BitDo Ultimate 2.4G Wireless Controller on macOS
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:
Mar ’24
SwiftUI Table sorts only the first column if the data is loaded later
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
1
0
686
Mar ’24