ํฌ๊ธฐ๋ฅผ ์ง์ ํ์ง ์๋ ํ CarouselView๋ ๋ ์ด์์์ ๋ชจ๋ ์์ง ๊ณต๊ฐ์ ์ฌ์ฉํฉ๋๋ค. ๊ทธ๋ฌ๋ ๋๋ ๊ทธ๊ฒ์ ๋ด ์ฝํ ์ธ ์ ๋ง๊ฒ ํฌ๊ธฐ๋ฅผ ์ง์ ํ๊ณ ์ถ์ต๋๋ค. ๋ด ์ฝํ ์ธ ์ ๋์ด ๋๋ ๋๋น์ ๋ง๊ฒ ํฌ๊ธฐ๋ฅผ ์กฐ์ ํด์ฃผ์ธ์.
<StackLayout Margin="15">
<Frame BackgroundColor="White"
Padding="10"
BorderColor="Black"
CornerRadius="0">
<CarouselView>
<CarouselView.ItemsSource>
<x:Array Type="{x:Type x:String}">
<x:String>rei_01.jpg</x:String>
<x:String>rei_02.jpg</x:String>
<x:String>rei_03.jpg</x:String>
<x:String>rei_04.jpg</x:String>
</x:Array>
</CarouselView.ItemsSource>
<CarouselView.ItemTemplate>
<DataTemplate>
<Image Source="{Binding .}"/>
</DataTemplate>
</CarouselView.ItemTemplate>
</CarouselView>
</Frame>
</StackLayout>
CarouselView ํฌ๊ธฐ๋ฅผ ๋ด ์ฝํ ์ธ ์ ๋ง๊ฒ ์กฐ์ ํ๊ณ ๋ค์ํ ํ๋ฉด ํฌ๊ธฐ์์ ์ผ๊ด๋ ๋ ์ด์์์ ์ ๊ณตํฉ๋๋ค.
CarouselView๋ ๋ ์ด์์์ ๋ชจ๋ ๊ณต๊ฐ์ ์๋นํ๋ฉฐ ๋ค๋ฅธ ๋ ์ด์์์๋ณด๊ธฐ ๋ฐ์ผ๋ก ๋ฐ์ด๋ ๋๋ค. ์ด ํ๋ฉด์์ ์ํ๋ ๊ฒฐ๊ณผ๋ฅผ ์ป์ผ๋ ค๋ฉด ๋์ด๋ฅผ ์ค์ ํด์ผํ์ง๋ง ๋ค๋ฅธ ํฌ๊ธฐ์ ํ๋ฉด์์๋ ์๋ชป ๋ณด์ผ ๊ฒ์ ๋๋ค.
๋ชจ๋ ์๋น ๋์ด :
๊ณ ์ ๋์ด (์ถ์ธก) :
์ด๊ฒ์ด ์ผ์ด๋๊ณ ์๋์ง ํ์ธํ์ต๋๋ค. ๋ด์ฉ์ ๋ง๊ฒ ํฌ๊ธฐ๋ฅผ ์กฐ์ ํ๊ธฐ ์ํด ๋ช ๊ฐ์ง ๋ค๋ฅธ ๋ฐฉ๋ฒ์ ์๋ํ์ง๋ง ํญ์ ์ฌ์ฉ ๊ฐ๋ฅํ ์ ์ฒด ๋์ด๋ฅผ ์ฐจ์งํ๋ ๊ฒ ๊ฐ์ต๋๋ค. Android์์ ๋ฐ์ํฉ๋๋ค.
iOS์์๋ ๋ชจ๋ NRE์ด๋ฉฐ ์คํ ์ถ์ ์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค. ๊ทธ๊ฒ์ด ์ด๊ฒ๊ณผ ๊ด๋ จ์ด ์๋์ง ํ์คํ์ง ์์ต๋๋ค. iOS ์ค๋ฅ๋ ์ ธ ๋ฌธ์ ์ ๋ ๊ฐ๊น์ต๋๋ค.
/ Users / builder / jenkins / workspace / xamarin-macios / xamarin-macios / external / mono์ System.Reflection.RuntimeConstructorInfo.InternalInvoke (System.Object obj, System.Object [] ๋งค๊ฐ ๋ณ์, System.Boolean wrapExceptions) [0x00018]์์ /mcs/class/corlib/System.Reflection/RuntimeMethodInfo.cs:944
/ Users / builder / jenkins / workspace / xamarin-macios / xamarin-macios / external / mono / mcs / class / corlib / ReferenceSources /์ System.RuntimeType.CreateInstanceMono (System.Boolean nonPublic, System.Boolean wrapExceptions) [0x00095]์์ RuntimeType.cs : 185
/ Users / builder / jenkins / workspace / xamarin-macios / xamarin-macios / external /์ System.RuntimeType.CreateInstanceSlow (System.Boolean publicOnly, System.Boolean wrapExceptions, System.Boolean skipCheckThis, System.Boolean fillCache) [0x00009]์์ mono / mcs / class / corlib / ReferenceSources / RuntimeType.cs : 155
/ Users / builder / jenkins / workspace / xamarin-macios์ System.RuntimeType.CreateInstanceDefaultCtor (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Boolean wrapExceptions, System.Threading.StackCrawlMark & โโstackMark) [0x00027]์์ /xamarin-macios/external/mono/mcs/class/referencesource/mscorlib/system/rttype.cs:5770
/ Users / builder / jenkins / workspace / xamarin-macios / xamarin-macios / external / mono / mcs / class์ System.Activator.CreateInstance (System.Type ์ ํ, System.Boolean nonPublic, System.Boolean wrapExceptions) [0x00039]์์ /referencesource/mscorlib/system/activator.cs:206
/ Users / builder / jenkins / workspace / xamarin-macios / xamarin-macios / external / mono / mcs / class / referencesource / mscorlib /์ System.Activator.CreateInstance (System.Type ํ์, System.Boolean nonPublic) [0x00000]์์ system / activator.cs : 190
/Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/external/mono/mcs/class/referencesource/mscorlib/system/activator.cs์ System.Activator.CreateInstance (System.Type ์ ํ) [0x00000]์์ : 134
at Xamarin.Forms.ElementTemplate + <> c__DisplayClass4_0. <. ctor> b__0 () [0x00000] in d : \ agent \ 1 \ s \ Xamarin.Forms.Core \ ElementTemplate.cs : 26
d : \ agent \ 1 \ s \ Xamarin.Forms.Core \ ElementTemplate.cs : 82์ Xamarin.Forms.ElementTemplate.CreateContent () [0x00031]์์
Xamarin.Forms.Internals.DataTemplateExtensions.CreateContent (Xamarin.Forms.DataTemplate self, System.Object ํญ๋ชฉ, Xamarin.Forms.BindableObject ์ปจํ ์ด๋) [0x00001] d : \ agent \ 1 \ s \ Xamarin.Forms.CoreDataTemplateExtensions.cs : 19
Xamarin.Forms.ShellContent.Xamarin.Forms.IShellContentController.GetOrCreateContent () [0x00036]์์ d : \ agent \ 1 \ s \ Xamarin.Forms.CoreShellShellContent.cs : 61
d : \ agent \ 1 \ s \ Xamarin.Forms.Platform.iOS \ RenderersShellSectionRootRenderer.cs : 145์ Xamarin.Forms.Platform.iOS.ShellSectionRootRenderer.LoadRenderers () [0x00024]์์
at Xamarin.Forms.Platform.iOS.ShellSectionRootRenderer.ViewDidLoad () [0x0003b] in d : \ agent \ 1 \ s \ Xamarin.Forms.Platform.iOS \ RenderersShellSectionRootRenderer.cs : 63
(๋ํผ์์ ๋ค์ดํฐ๋ธ๋ก ๊ด๋ฆฌ ๋จ) UIKit.UIApplication.UIApplicationMain (int, string [], intptr, intptr)
/Library/Frameworks/Xamarin.iOS.framework/Versions/13.8.2.2/src/Xamarin.iOS์ UIKit.UIApplication.Main (System.String [] args, System.IntPtr principal, System.IntPtr delegate) [0x00005]์์ /UIKit/UIApplication.cs:86
/Library/Frameworks/Xamarin.iOS.framework/Versions/13.8.2.2/src/Xamarin.iOS์ UIKit.UIApplication.Main (System.String [] args, System.String principalClassName, System.String delegateClassName) [0x0000e]์์ /UIKit/UIApplication.cs:65
CarouselGallery.iOS.Application.Main (System.String [] args) [0x00001] in /Users/jfversluis/Downloads/CarouselGallery-master/CarouselGallery/CarouselGallery.iOS/Main.cs:17
๋ฟก๋ฟก
ํ. ์ด๊ฒ์ ๋ํ ์ง์ ์ด ์์ต๋๊น? ์ด ๋ฒ๊ทธ๋ก CarouselView๋ฅผ ์ฌ์ฉํ ์ ์์ต๋๋ค.
@ez ์ ์ด์ผ๊ธฐ๋ฅผ
ํด๊ฒฐ ๋ฐฉ๋ฒ์ผ๋ก ์คํ ๋ ์ด์์์ ๋ฃ์ผ๋ฉด ์๋ํฉ๋๋ค.
ํด๊ฒฐ ๋ฐฉ๋ฒ์ผ๋ก ์คํ ๋ ์ด์์์ ๋ฃ์ผ๋ฉด ์๋ํฉ๋๋ค.
๊ทธ๋ฌ๋ @davidortinau ์ ์ํ ์ฝ๋์์ CarouselView๋ ์ด๋ฏธ StackLayout ์์ ๋ฐฐ์น๋์ด ์์ต๋๋ค. ํด๊ฒฐ ๋ฐฉ๋ฒ์ ์ด๋ป๊ฒ ์๋ํฉ๋๊น?
@samhouts ์ด๊ฒ์ ์ง์ ์ด ์์ต๋๊น? ๋์๊ฒ ์๋นํ ํฐ ๋ฌธ์ atm
์ด๊ฒ์ ๋ํ ์์ ๋๋ณด๊ณ ์ถ์ต๋๋ค.
CollectionView์์์ด ๋ฌธ์ ๊ฐ ํด๊ฒฐ๋๊ธฐ๋ฅผ ๊ธฐ๋ํฉ๋๋ค. ๋ ๊ฐ์ง ๊ณต๊ฐ ๋ฌธ์ ๊ฐ ๋์์ ํด๊ฒฐ๋๋ ๊ฒ ๊ฐ์ต๋๋ค. ๋ ๊ฐ์ CollectionView๋ฅผ ํฌํจํ๋ ๋ด ๋ ์ด์์์ด ์์๋๋ก ๋ ์ด์์๋์ง ์์ ์ด์ ๋ฅผ ํ์ ํ๋ ๋ฐ ๋ง์ ์๊ฐ์ ๋ณด๋์ต๋๋ค.
2019 ๋ 11 ์ 24 ์ผ ์คํ ... ๋ด์ค๊ฐ ์์ต๋๊น?
๋ฟก๋ฟก
์ด ๋ฒ๊ทธ๋ก ์ธํด CarouselView๋ฅผ ์ฌ์ฉํ ์ ์์ต๋๋ค. ์ด ๋ฌธ์ ๊ฐ ํด๊ฒฐ ๋ ๊น์?
Xamarin ํ, ์ด๋ฌํ ๊ตฌ์ฑ ์์๋ ํ์ฌ ํ๋ก๋์
ํ๊ฒฝ์์ ์ฌ์ฉํ ์ ์์ต๋๋ค. ์ด ๋ฌธ์ ๋ 2019 ๋
๋ง๋ถํฐ ๊ณต๊ฐ๋์์ต๋๋ค. ๋ฌด์จ ์ผ์ด ์ผ์ด๋๊ณ ์์ต๋๊น? ๊ณ ์ฅ์ด ๋๊ณ ๊ณ ์ณ์ง์ง ์์ ๊ฒฝ์ฐ ๊ถ๊ทน์ ์ผ๋ก ์๋ํ์ง ์์ ์ผ์ ์๊ฐ์ ๋ญ๋นํ๋๋กํ๋ ๋์ ๊ฐ๋ฐ์์๊ฒ ์๋ฆฌ๋๋ก ํ๊ธฐํ์ญ์์ค. ๊ทธ๋ค์ด ์๋ํ์ง ์๊ฑฐ๋ ๊ณ ์ณ์ง ๊ฒ์ด๋ผ๋ ๊ธฐ๋๊ฐ ๋ ๊ฒ์ด๋ฏ๋ก ์ธ๋ชจ์๋ ๊ฒ์ด ๋ ์ข์ต๋๋ค.
๊ฐ์ฌ!
๊ทธ๋ฅ ๊ทธ๋ ๊ฒ ๋๋ ์๋ค์ํผ, ๋น์ ์ ์ ๋์ ์ผ๋ก CollectionView๋ฅผ ์ฌ์ฉํด์ผ ํ ๊ฒฝ์ฐ ์์ ๋ทฐ์ ํฌ๊ธฐ ๋ณํ์ ๊ตฌ๋ ์ด ์ ์ ํ๊ฒ ์๋์ผ๋ก ์ค์ CollectionView์ ๋์ด์ ์ฌ์ฉํ ์์๋ ๋งค์ฐ ๋๋ฌ์ด ํดํน. ๊ทธ๋ฌ๋ ๋๋ ์ด๊ฒ์ด ์์์์ ์๋ํ๋ ๊ฒ์๋ณด๊ณ ์ถ์ต๋๋ค. :)
ํํธ ์ ๋ ์ด์ ๊ฐ์ ๋ฒ๊ทธ์ ๋ํ ํด๊ฒฐ ๋ฐฉ๋ฒ ์ฝ๋๋ฅผ ๋๋ฌด ๋ง์ด ์์ฑํ์ฌ ์ ์ฒด ํ๋ซํผ ๊ฐ ์ด์ ์ด ๋ น์ ๋ด๋ฆฌ๊ณ ์์ต๋๋ค. ๊ทผ์ฌ๊ฑฐ๋ฆฌ.
์ด๊ฒ์ ๋ํ ๋ง์? CollectionView ๋๋ CarouselView๋ฅผ ์ฌ์ฉํ๊ณ ์ถ์ ๋๋ง๋ค์ด ๋ฌธ์ ๋ก ์ธํด ํ๋ฅผ ๋ด๊ณ ๊ณ ๊ฐ ๋ฆฌํผํฐ ๋๋ ๋ฐ์ธ๋ฉ ๊ฐ๋ฅํ ๋ ์ด์์์ ์์กดํด์ผํฉ๋๋ค. ํนํ CollectionView๊ฐ Preview์์ ๋ฒ์ด ๋ฌ๊ธฐ ๋๋ฌธ์ ์ด๊ฒ์ด ๋์ ์ฐ์ ์์๋ฅผ ๋ถ์ฌ๋ฐ์ง ๋ชปํ ๊ฒ์ ์ค๋ง ์ค๋ฝ์ต๋๋ค.
์ด ๋ฌธ์ ๋ฅผ ์์ ํ์ธ์. ์ด๊ฒ์ ๋ง์ ์ํฅ์ ๋ฏธ์น๊ณ ์์ต๋๋ค. ๋์ผํ ํ์ด์ง์ ์ปฌ๋ ์ ๋ทฐ์ ์บ ๋ฌ์ ๋ทฐ๊ฐ ์๋๋ฐ ์ด๊ฒ์ ์ ๋ฅผ ์ฃฝ์ด๊ณ ์์ต๋๋ค ..
๊ทธ๋ ๋๋ ์ฌ๊ธฐ์ ๊ฐ์ ๋ฌธ์ ๊ฐ ์์ด์
๋๊ตฌ๋ ์ง์ด ๋ฌธ์ ์ ๋ํ ํด๊ฒฐ ๋ฐฉ๋ฒ์ ์ฐพ์์ต๋๊น?
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
ํํธ ์ ๋ ์ด์ ๊ฐ์ ๋ฒ๊ทธ์ ๋ํ ํด๊ฒฐ ๋ฐฉ๋ฒ ์ฝ๋๋ฅผ ๋๋ฌด ๋ง์ด ์์ฑํ์ฌ ์ ์ฒด ํ๋ซํผ ๊ฐ ์ด์ ์ด ๋ น์ ๋ด๋ฆฌ๊ณ ์์ต๋๋ค. ๊ทผ์ฌ๊ฑฐ๋ฆฌ.