본문 바로가기

전체 글72

SwiftUI에서 GeometryProxy 사용하기 GeometryProxy GeometryReader 는 컨테이너 뷰의 한 종류이며, 다른 컨테이너뷰의 ViewBuilder와는 다르게 인자를 하나 받는데 그것이 GeometryProxy 객체다. 실제로 상위 뷰의 정보는 이 객체를 통해 접근이 가능하다. 기본적으로 GeometryProxy 는 size 프로퍼티를 갖고 있다. .frame(in: ) 라는 메소드가 있으며, 서브크립트도 지원한다. GeometryProxy 코드 struct GeometryProxy { var size: CGSize { get } var safeAreaInsets: EdgeInsets { get } func frame(in coordinateSpace: CoordinateSpace) -> CGRect subscrip(anchor.. 2022. 12. 1.
[Error] flutter_svg 플러그인의 url(’#pattern’) 예외 상황 에러 에러 메시지 ======== Exception caught by SVG =================================================================== The following assertion was thrown while parsing AssetBundlePictureKey(bundle: PlatformAssetBundle#17ec6(), name: "assets/images/mood_absurd.svg", colorFilter: null, theme: SvgTheme(currentColor: Color(0xff000000), fontSize: 14.0, xHeight: 7.0)) in _getDefinitionPaint: Failed to find defin.. 2022. 11. 30.
SwiftUI AspectRatio / GeometryReader 이용하기 AspectRatio 이미지를 원래 크기 그대로 넣고 싶은 경우도 있지만 사이즈 조정을 해서 지정된 사이즈 안에 이미지가 들어가게 하려면 AspectRatio 를 이용하면 원하는 크기에 이미지가 맞게 조정된다. .clipped() 를 이용해 이미지를 자를 수 있지만 .resizable() 과 .aspectRatio() 를 사용하면 간편하다. 기본 코드 import SwiftUI struct ContentView: View { var body: some View { VStack { Image(systemName: "star.circle") .resizable() .aspectRatio(contentMode: .fit) .frame(width: 300, height: 300) } } } .aspectRadi.. 2022. 11. 29.
[Flutter] RemoteConfig 값을 runApp 전에 가져올 때 생기는 에러 에러 문구 W/FirebaseRemoteConfig(17442): Could not update ABT experiments. W/FirebaseRemoteConfig(17442): com.google.firebase.abt.AbtException: The Analytics SDK is not available. Please check that the Analytics SDK is included in your app dependencies. W/FirebaseRemoteConfig(17442): at com.google.firebase.abt.FirebaseABTesting.throwAbtExceptionIfAnalyticsIsNull(FirebaseABTesting.java:342) W/Firebas.. 2022. 11. 28.

\