Hi everybody. Reality Kit allows us to prepare a simple sphere, plane or cube "made from" occlusion material to hide some AR content.
It is OK, but I need some more sophisticated shape than a simple cube or sphere as an occlusion mask. It needs to be a USDZ asset, that I use in Reality Kit. I need to apply the occlusion material to this usdz asset.
Does anybody know, how to do it?
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hi, I am planning to save audio files (voice memos from audio recorder) in core data using external storage functionality. I cannot save the files elsewhere and hold the file name only in core data, because I want to use CloudKit to synchronise the data between devices.
I am looking for some example code, how to store speech memo in core data and how to fetch it to the app. I know, I need to use "binary data" as data type and use external storage functionality. But how do I save the voice memo to the core data?
Hi, I am trying to test the new iPadOS 14 feature: sidebar. However I cannot find any good implementation example code. I want to make the navigation in sidebar, which will for example control the ShowDetail View, and from the ShowDetail View I can dig deeper in EditDetail View. When I try this code:
struct iPadSidebarView: View {
var body: some View {
NavigationView {
Sidebar()
ShowDetail(whichRow: "some starting text")
EditDetail()
}
}
}
struct Sidebar: View {
var body: some View {
NavigationView {
List(1..<10) { i in
NavigationLink (
destination: ShowDetail(whichRow: "Row \(i)"),
label: {
	 Text("Row \(i)")
})
}
.listStyle(SidebarListStyle())
}
}
}
struct ShowDetail: View {
var whichRow: String
var body: some View {
Text (whichRow)
}
}
struct EditDetail: View {
var body: some View {
Text ("only for start")
}
}
the sidebar is living its own life, showing me ShowDetail View in itself, but ShowDetail View remains unchanged all the time with starting text.
Is there a code example of smoothly working sidebar navigation for iPadOS 14 somewhere?
I want to test the new ColorPicker in swift UI.
struct ContentView: View {
@State private var newColor = Color.white
var body: some View {
ColorPicker("choose something", selection: $newColor)
}
}
First I can see the color ring. When I am trying to choose something, the new modal view with quite complicated picker is appearing, I have many ways to choose something and this is ok. The problem is, I get stuck with the modal view and cannot make it disappear and continue with the chosen color. How to make it?
I am testing new Swift UI features and encountered strange issue with the appearance of "Label" Element.
struct ContentView: View {
let items = ["item 1", "item 2", "item 3" , "item 4"]
var body: some View {
List {
	 Label(items[0], systemImage:"a.book.closed")
Label(items[1], systemImage:"pencil")
Label(items[2], systemImage:"flowchart")
Label(items[3], systemImage:"hand.wave")
}
}
}
The system images are moved upwards and not aligned horizontally with text items. Its different from the appearance from WWDC presentation. Where is the problem?