Doris

@rizzyD

Joined on Sep 25, 2021

  • hackmd-github-sync-badge <img src="https://i.imgur.com/OtIpgET.jpg" height="250px" width="1000px"> Through this tutorial, you’ll be able to make your terminal looks super cool. If you can’t beat others with coding, at least beat them with good Terminal interface. Install Nerd Font Install zsh Install zsh theme: powerlevel10k Setup powerlevel10k
     Like  Bookmark
  • :::danger In iOS 17, AVSpeechSynthesizer cannot work properly. Check out the problem here ::: In <font color="red">AVFoundation</font>, there is a class named<font color="red">AVSpeechSynthesizer</font>. With <font color="red">AVSpeechSynthesizer</font> you can customize the texts that you want your app to speak. AVSpeechSynthesizer Declaration class AVSpeechSynthesizer : NSObject To configure the way your app speak, like voice, language, contents and so on, we use <font color="red">AVSpeechUtterance</font>.
     Like  Bookmark
  • How to display gif in SwiftUI? In SwiftUI, gif is not supported in Image View, if you try <font color="#f00">Image(”your_gif_name”)</font>, it’ll only show a blank page. There are many ways to do it, like using <font color="#f00">CGAnimateImageDataWithBloc</font>, separate your gif into series of image and use <font color="#f00">animatedImage</font> to play those pictures and so on, but I found out that you can also use <font color="#f00">WKWebView</font> (in WebKit) to accomplish it. So let’s get started. 👍 Create a new SwiftUI View and add your gif file into folders Create a new WKWebView When you use <font color="#f00">UIViewRepresentable</font> , make sure you create <font color="#f00">makeUIView</font> and <font color="#f00">updateUIVew</font> as well. // Remember to import WebKit import WebKit
     Like  Bookmark
  • Declariation //Convert a UIView from UIKit to SwiftUI protocol UIViewRepresentable : View where Self.Body == Never UIViewRepresentable is a simple wrapper that we can use to take UIKit components and put them into SwiftUI. So what does UIViewRepresentable do exactly? It can encapulate UIKit into SwiftUI View, and then we will be able to reuse all the components in UIKit easily. There are two protocols that must be introduced.
     Like  Bookmark
  • In SwiftUI, gif is not sopported in Image View, if you try Image(”your_gif_name”), it’ll only show a blank page. There are many ways to do it, like using CGAnimateImageDataWithBloc, separate your gif into series of image and use animatedImage to play those pictures and so on, but I found out that you can also use WKWebView (in WebKit) to accomplish it. So let’s get started. 👍 Create a new SwiftUI View and add your gif file into folders Create a new WKWebView When you use UIViewRepresentable , make sure you create makeUIView and updateUIVew as well. //Remember to import WebKit import WebKit
     Like  Bookmark
  • I’m going to make my app to talk whatever I wat it to say. To do that, we need AVSpeechSynthesizer You can check out my article AVSpeechSynthesizer to know more about it. import SwiftUI //Remember to import this framework import AVFoundation struct ContentView: View {
     Like  Bookmark
  • Flutter 需要 Git 才能安裝,建議安裝 Xcode,安裝 Xcode 時會幫忙安裝 Git 下載 Flutter SDK 與 Android SDK 設定PATH 💡添加指令bin到path(environment 環境) 查看path echo $PATH
     Like  Bookmark
  • Assets To help you manage and create user interface elements for your app. Images you create for your app, including app icons, launch screens, color sets and so on will be stored in here. Function 💡 When you create a new Xcode project, it will automatically add a file named Assets.xcassets to your project Adding Image
     Like  Bookmark