nilcoalescing / swiftui-code-examples Goto Github PK
View Code? Open in Web Editor NEWIn this repository we are collecting our solutions to interesting SwiftUI problems that we encounter when developing our apps.
License: MIT License
In this repository we are collecting our solutions to interesting SwiftUI problems that we encounter when developing our apps.
License: MIT License
I was trying to follow the article that includes the below line of code.
Seems that it doesn’t compile with Xcode 14b5 :(
I get:
Value of type 'some ChartContent' has no member 'blendMode'
I couldn’t find anything in the Xcode or iOS release notes about a change in this API.
When you attach TextField to keyboard like that:
Is there a way to achieve behavior like in iMessage with SwiftUI?
How can I back support iOS 14, iOS 15 while preserve the new functionality introduced this year through the new APIs, I mean, Is these APIs back supported? OR they can only work on iOS 16?
When I try to use viewThatFits
as described in the Expandable-text-with-line-limit.swift
example but with a LazyVStack
shows the button incorrectly when scrolling up and down, copy and paste the following code to try it out:
struct ContentView: View {
var items = ["this is test text",
"this is test text this is test text",
" this is test text this is test text this is test text",
"this is test text this is test text this is test text this is test text",
"this is test text this is test text this is test text this is test text this is test text",
"this is test text this is test text this is test text this is test text this is test text this is test text",
"this is a small text",
"this is test text this is test text this is test text this is test text this is test text this is test text this is test text this is test text",
"this is test text this is test text this is test text this is test text this is test text this is test text this is test text this is test text this is test text",
"this is test text this is test text this is test text this is test text this is test text this is test text this is test text this is test text this is test text this is test text",
"this is test text this is test text this is test text this is test text this is test text this is test text this is test text this is test text this is test text this is test text this is test text",
]
var body: some View {
ScrollView {
LazyVStack(spacing: 0) {
ForEach(items, id: \.self) { item in
ExpandableTextWithLineLimit(text: item, initialLineLimit: 2)
.padding()
}
}
}
}
}
However, this issue doesn't happen with a VStack
, but I need to use LazyVStack
to simulate async data rendering.
After selecting the done button, I was unable to do anything. This issue is only on iOS 17.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.