Post

Replies

Boosts

Views

Activity

Reply to Choppy minimized search bar animation
Dear @DTS Engineer, thank you very much for your continued effort on this matter! Truly appreciate it! I use Xcode Version 26.2 (17C52) and experience this choppy animation in both SwiftUI Canvas and an actual device running iOS26.2. At the same time, I would like to point out that the animation indeed runs smoothly when the TabView is commented out / not used at all (as perhaps in your code). It does not, however, when the TabView is used (as in my initial code). #Preview { if #available(iOS 26, *) { TabView { // Does this cause a problem? Tab { SwiftUIView() } label: { Label("Test", systemImage: "calendar") } } } else { // Fallback on earlier versions } } Hopefully this helps to narrow down the source of the issue!
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’26
Reply to Choppy minimized search bar animation
Dear @DTS Engineer, Thank you for your reply and suggested way forward. I reduced the code to the minimum for further testing purposes: struct SwiftUIView: View { @State var searchQuery: String = "" var body: some View { NavigationStack { ScrollView { Text("Test") } .navigationTitle("Test") } .searchable(text: $searchQuery) .searchToolbarBehavior(.minimize) } } #Preview { if #available(iOS 26, *) { TabView { Tab { SwiftUIView() } label: { Label("Test", systemImage: "calendar") } } } else { // Fallback on earlier versions } } I did not remove .searchable as per your suggestion since without it the .searchToolbarBehavior(.minimize) does not appear to have any effect (the search button is simply not shown). The code above still leads to the same choppy animation as demonstrated in my initial message. As further testing, I tried to extract the NavigationStack view to a separate view (similarly to here), and to remove ScrollView or replace it with a List, but to no success. Hopefully this is helpful.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’26
Reply to Timestamps in AVPlayer
As an additional background, I use a m3u8 file, which contains the following metadata. #EXT-X-VERSION:5 #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="audio",NAME="Original Audio",LANGUAGE="qag",AUTOSELECT=YES,URI="audio-13-64000/prog_index.m3u8?start=2023-03-01T10%3A29%3A04%2B0000&end=2023-03-01T11%3A09%3A18%2B0000&sourcetimestamps=1&returnType=hls",DEFAULT=YES #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="audio",NAME="Original Audio 1",LANGUAGE="qaf",AUTOSELECT=YES,URI="audio-12-64000/prog_index.m3u8?start=2023-03-01T10%3A29%3A04%2B0000&end=2023-03-01T11%3A09%3A18%2B0000&sourcetimestamps=1&returnType=hls" #EXT-X-STREAM-INF:BANDWIDTH=388328,RESOLUTION=426x240,CODECS="avc1.4dc01f,mp4a.40.2",AUDIO="audio" 300/prog_index.m3u8?start=2023-03-01T10%3A29%3A04%2B0000&end=2023-03-01T11%3A09%3A18%2B0000&sourcetimestamps=1&returnType=hls #EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=388328,RESOLUTION=426x240,CODECS="avc1.4dc01f",URI="300/prog_index.m3u8?start=2023-03-01T10%3A29%3A04%2B0000&end=2023-03-01T11%3A09%3A18%2B0000&sourcetimestamps=1&returnType=hls&keyframes=1" #EXT-X-STREAM-INF:BANDWIDTH=694928,RESOLUTION=640x360,CODECS="avc1.4dc01f,mp4a.40.2",AUDIO="audio" 600/prog_index.m3u8?start=2023-03-01T10%3A29%3A04%2B0000&end=2023-03-01T11%3A09%3A18%2B0000&sourcetimestamps=1&returnType=hls #EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=694928,RESOLUTION=640x360,CODECS="avc1.4dc01f",URI="600/prog_index.m3u8?start=2023-03-01T10%3A29%3A04%2B0000&end=2023-03-01T11%3A09%3A18%2B0000&sourcetimestamps=1&returnType=hls&keyframes=1" #EXT-X-STREAM-INF:BANDWIDTH=1001528,RESOLUTION=854x480,CODECS="avc1.4dc01f,mp4a.40.2",AUDIO="audio" 900/prog_index.m3u8?start=2023-03-01T10%3A29%3A04%2B0000&end=2023-03-01T11%3A09%3A18%2B0000&sourcetimestamps=1&returnType=hls #EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=1001528,RESOLUTION=854x480,CODECS="avc1.4dc01f",URI="900/prog_index.m3u8?start=2023-03-01T10%3A29%3A04%2B0000&end=2023-03-01T11%3A09%3A18%2B0000&sourcetimestamps=1&returnType=hls&keyframes=1" #EXT-X-STREAM-INF:BANDWIDTH=1308128,RESOLUTION=1024x576,CODECS="avc1.4dc01f,mp4a.40.2",AUDIO="audio" 1200/prog_index.m3u8?start=2023-03-01T10%3A29%3A04%2B0000&end=2023-03-01T11%3A09%3A18%2B0000&sourcetimestamps=1&returnType=hls #EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=1308128,RESOLUTION=1024x576,CODECS="avc1.4dc01f",URI="1200/prog_index.m3u8?start=2023-03-01T10%3A29%3A04%2B0000&end=2023-03-01T11%3A09%3A18%2B0000&sourcetimestamps=1&returnType=hls&keyframes=1" #EXT-X-STREAM-INF:BANDWIDTH=2125728,RESOLUTION=1280x720,CODECS="avc1.640029,mp4a.40.2",AUDIO="audio" 2000/prog_index.m3u8?start=2023-03-01T10%3A29%3A04%2B0000&end=2023-03-01T11%3A09%3A18%2B0000&sourcetimestamps=1&returnType=hls #EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=2125728,RESOLUTION=1280x720,CODECS="avc1.640029",URI="2000/prog_index.m3u8?start=2023-03-01T10%3A29%3A04%2B0000&end=2023-03-01T11%3A09%3A18%2B0000&sourcetimestamps=1&returnType=hls&keyframes=1" #EXT-X-STREAM-INF:BANDWIDTH=4169728,RESOLUTION=1920x1080,CODECS="avc1.640029,mp4a.40.2",AUDIO="audio" 4000/prog_index.m3u8?start=2023-03-01T10%3A29%3A04%2B0000&end=2023-03-01T11%3A09%3A18%2B0000&sourcetimestamps=1&returnType=hls #EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=4169728,RESOLUTION=1920x1080,CODECS="avc1.640029",URI="4000/prog_index.m3u8?start=2023-03-01T10%3A29%3A04%2B0000&end=2023-03-01T11%3A09%3A18%2B0000&sourcetimestamps=1&returnType=hls&keyframes=1"
Topic: Media Technologies SubTopic: Video Tags:
Sep ’23
Reply to ShareLink and PDFDocument
So I managed to get it working by extending PDFDocument. This is not a super clean solution, so please feel free to improve it further in the comments! extension PDFDocument: Transferable {     public static var transferRepresentation: some TransferRepresentation {         DataRepresentation(contentType: .pdf) { pdf in                 if let data = pdf.dataRepresentation() {                     return data                 } else {                     return Data()                 }             } importing: { data in                 if let pdf = PDFDocument(data: data) {                     return pdf                 } else {                     return PDFDocument()                 }             }         DataRepresentation(exportedContentType: .pdf) { pdf in             if let data = pdf.dataRepresentation() {                 return data             } else {                 return Data()             }         }      } } And then you can share the PDF document like this: if let document = document { ShareLink(item: document, preview: SharePreview("PDF")) }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jul ’22
Reply to Choppy minimized search bar animation
Dear @DTS Engineer, thank you very much for your continued effort on this matter! Truly appreciate it! I use Xcode Version 26.2 (17C52) and experience this choppy animation in both SwiftUI Canvas and an actual device running iOS26.2. At the same time, I would like to point out that the animation indeed runs smoothly when the TabView is commented out / not used at all (as perhaps in your code). It does not, however, when the TabView is used (as in my initial code). #Preview { if #available(iOS 26, *) { TabView { // Does this cause a problem? Tab { SwiftUIView() } label: { Label("Test", systemImage: "calendar") } } } else { // Fallback on earlier versions } } Hopefully this helps to narrow down the source of the issue!
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jan ’26
Reply to Choppy minimized search bar animation
Dear @DTS Engineer, Thank you for your reply and suggested way forward. I reduced the code to the minimum for further testing purposes: struct SwiftUIView: View { @State var searchQuery: String = "" var body: some View { NavigationStack { ScrollView { Text("Test") } .navigationTitle("Test") } .searchable(text: $searchQuery) .searchToolbarBehavior(.minimize) } } #Preview { if #available(iOS 26, *) { TabView { Tab { SwiftUIView() } label: { Label("Test", systemImage: "calendar") } } } else { // Fallback on earlier versions } } I did not remove .searchable as per your suggestion since without it the .searchToolbarBehavior(.minimize) does not appear to have any effect (the search button is simply not shown). The code above still leads to the same choppy animation as demonstrated in my initial message. As further testing, I tried to extract the NavigationStack view to a separate view (similarly to here), and to remove ScrollView or replace it with a List, but to no success. Hopefully this is helpful.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jan ’26
Reply to Timestamps in AVPlayer
As an additional background, I use a m3u8 file, which contains the following metadata. #EXT-X-VERSION:5 #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="audio",NAME="Original Audio",LANGUAGE="qag",AUTOSELECT=YES,URI="audio-13-64000/prog_index.m3u8?start=2023-03-01T10%3A29%3A04%2B0000&end=2023-03-01T11%3A09%3A18%2B0000&sourcetimestamps=1&returnType=hls",DEFAULT=YES #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="audio",NAME="Original Audio 1",LANGUAGE="qaf",AUTOSELECT=YES,URI="audio-12-64000/prog_index.m3u8?start=2023-03-01T10%3A29%3A04%2B0000&end=2023-03-01T11%3A09%3A18%2B0000&sourcetimestamps=1&returnType=hls" #EXT-X-STREAM-INF:BANDWIDTH=388328,RESOLUTION=426x240,CODECS="avc1.4dc01f,mp4a.40.2",AUDIO="audio" 300/prog_index.m3u8?start=2023-03-01T10%3A29%3A04%2B0000&end=2023-03-01T11%3A09%3A18%2B0000&sourcetimestamps=1&returnType=hls #EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=388328,RESOLUTION=426x240,CODECS="avc1.4dc01f",URI="300/prog_index.m3u8?start=2023-03-01T10%3A29%3A04%2B0000&end=2023-03-01T11%3A09%3A18%2B0000&sourcetimestamps=1&returnType=hls&keyframes=1" #EXT-X-STREAM-INF:BANDWIDTH=694928,RESOLUTION=640x360,CODECS="avc1.4dc01f,mp4a.40.2",AUDIO="audio" 600/prog_index.m3u8?start=2023-03-01T10%3A29%3A04%2B0000&end=2023-03-01T11%3A09%3A18%2B0000&sourcetimestamps=1&returnType=hls #EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=694928,RESOLUTION=640x360,CODECS="avc1.4dc01f",URI="600/prog_index.m3u8?start=2023-03-01T10%3A29%3A04%2B0000&end=2023-03-01T11%3A09%3A18%2B0000&sourcetimestamps=1&returnType=hls&keyframes=1" #EXT-X-STREAM-INF:BANDWIDTH=1001528,RESOLUTION=854x480,CODECS="avc1.4dc01f,mp4a.40.2",AUDIO="audio" 900/prog_index.m3u8?start=2023-03-01T10%3A29%3A04%2B0000&end=2023-03-01T11%3A09%3A18%2B0000&sourcetimestamps=1&returnType=hls #EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=1001528,RESOLUTION=854x480,CODECS="avc1.4dc01f",URI="900/prog_index.m3u8?start=2023-03-01T10%3A29%3A04%2B0000&end=2023-03-01T11%3A09%3A18%2B0000&sourcetimestamps=1&returnType=hls&keyframes=1" #EXT-X-STREAM-INF:BANDWIDTH=1308128,RESOLUTION=1024x576,CODECS="avc1.4dc01f,mp4a.40.2",AUDIO="audio" 1200/prog_index.m3u8?start=2023-03-01T10%3A29%3A04%2B0000&end=2023-03-01T11%3A09%3A18%2B0000&sourcetimestamps=1&returnType=hls #EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=1308128,RESOLUTION=1024x576,CODECS="avc1.4dc01f",URI="1200/prog_index.m3u8?start=2023-03-01T10%3A29%3A04%2B0000&end=2023-03-01T11%3A09%3A18%2B0000&sourcetimestamps=1&returnType=hls&keyframes=1" #EXT-X-STREAM-INF:BANDWIDTH=2125728,RESOLUTION=1280x720,CODECS="avc1.640029,mp4a.40.2",AUDIO="audio" 2000/prog_index.m3u8?start=2023-03-01T10%3A29%3A04%2B0000&end=2023-03-01T11%3A09%3A18%2B0000&sourcetimestamps=1&returnType=hls #EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=2125728,RESOLUTION=1280x720,CODECS="avc1.640029",URI="2000/prog_index.m3u8?start=2023-03-01T10%3A29%3A04%2B0000&end=2023-03-01T11%3A09%3A18%2B0000&sourcetimestamps=1&returnType=hls&keyframes=1" #EXT-X-STREAM-INF:BANDWIDTH=4169728,RESOLUTION=1920x1080,CODECS="avc1.640029,mp4a.40.2",AUDIO="audio" 4000/prog_index.m3u8?start=2023-03-01T10%3A29%3A04%2B0000&end=2023-03-01T11%3A09%3A18%2B0000&sourcetimestamps=1&returnType=hls #EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=4169728,RESOLUTION=1920x1080,CODECS="avc1.640029",URI="4000/prog_index.m3u8?start=2023-03-01T10%3A29%3A04%2B0000&end=2023-03-01T11%3A09%3A18%2B0000&sourcetimestamps=1&returnType=hls&keyframes=1"
Topic: Media Technologies SubTopic: Video Tags:
Replies
Boosts
Views
Activity
Sep ’23
Reply to ShareLink and PDFDocument
So I managed to get it working by extending PDFDocument. This is not a super clean solution, so please feel free to improve it further in the comments! extension PDFDocument: Transferable {     public static var transferRepresentation: some TransferRepresentation {         DataRepresentation(contentType: .pdf) { pdf in                 if let data = pdf.dataRepresentation() {                     return data                 } else {                     return Data()                 }             } importing: { data in                 if let pdf = PDFDocument(data: data) {                     return pdf                 } else {                     return PDFDocument()                 }             }         DataRepresentation(exportedContentType: .pdf) { pdf in             if let data = pdf.dataRepresentation() {                 return data             } else {                 return Data()             }         }      } } And then you can share the PDF document like this: if let document = document { ShareLink(item: document, preview: SharePreview("PDF")) }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jul ’22