Bagikan melalui


UICollectionViewCell.GetAppearance Metode

Definisi

Overload

GetAppearance(UITraitCollection)

Mengembalikan proksi tampilan untuk yang ditentukan traits.

GetAppearance(UITraitCollection, Type[])

Mengembalikan proksi tampilan untuk yang ditentukan traits saat ditemukan dalam containers hierarki penahanan.

GetAppearance<T>()

Mendapatkan proksi UICollectionViewCell.UICollectionViewCellAppearance penampilan untuk subkelas UICollectionViewCell.

GetAppearance<T>(UITraitCollection)

Mendapatkan proksi UICollectionViewCell.UICollectionViewCellAppearance penampilan untuk subkelas UICollectionViewCell.

GetAppearance<T>(UITraitCollection, Type[])

Mendapatkan proksi UICollectionViewCell.UICollectionViewCellAppearance penampilan untuk subkelas UICollectionViewCell yang memiliki koleksi sifat yang ditentukan saat tampilan dihosting dalam hierarki yang ditentukan.

GetAppearance(UITraitCollection)

Mengembalikan proksi tampilan untuk yang ditentukan traits.

public static UIKit.UICollectionViewCell.UICollectionViewCellAppearance GetAppearance (UIKit.UITraitCollection traits);
static member GetAppearance : UIKit.UITraitCollection -> UIKit.UICollectionViewCell.UICollectionViewCellAppearance

Parameter

Mengembalikan

Berlaku untuk

GetAppearance(UITraitCollection, Type[])

Mengembalikan proksi tampilan untuk yang ditentukan traits saat ditemukan dalam containers hierarki penahanan.

public static UIKit.UICollectionViewCell.UICollectionViewCellAppearance GetAppearance (UIKit.UITraitCollection traits, params Type[] containers);
static member GetAppearance : UIKit.UITraitCollection * Type[] -> UIKit.UICollectionViewCell.UICollectionViewCellAppearance

Parameter

containers
Type[]

Mengembalikan

Berlaku untuk

GetAppearance<T>()

Mendapatkan proksi UICollectionViewCell.UICollectionViewCellAppearance penampilan untuk subkelas UICollectionViewCell.

public static UIKit.UICollectionViewCell.UICollectionViewCellAppearance GetAppearance<T> () where T : UIKit.UICollectionViewCell;
static member GetAppearance : unit -> UIKit.UICollectionViewCell.UICollectionViewCellAppearance (requires 'T :> UIKit.UICollectionViewCell)

Jenis parameter

T

Jenis yang harus dikembalikan oleh proksi UIAppearance. Ini adalah subkelas UICollectionViewCell.

Mengembalikan

objek proksi tampilan untuk jenis yang ditentukan.

Keterangan

Mengatur properti tampilan apa pun pada objek yang dikembalikan akan memengaruhi tampilan semua kelas dan subkelas parameter jenis.

Appearance Tidak seperti properti , atau AppearanceWhenContainedIn(Type[]) metode yang hanya berfungsi pada instans kelas khusus ini, proksi yang dikembalikan oleh GetAppearance dapat digunakan untuk mengubah gaya subkelas.

Contoh berikut menunjukkan cara kerja metode GetAppearance

var myTheme = UICollectionViewCell.GetAppearance<MyUICollectionViewCellSubclass> ();
myTheme.TintColor = UIColor.Red;

Untuk informasi lainnya, lihat dokumentasi untuk metode UIAppearance.

Berlaku untuk

GetAppearance<T>(UITraitCollection)

Mendapatkan proksi UICollectionViewCell.UICollectionViewCellAppearance penampilan untuk subkelas UICollectionViewCell.

public static UIKit.UICollectionViewCell.UICollectionViewCellAppearance GetAppearance<T> (UIKit.UITraitCollection traits) where T : UIKit.UICollectionViewCell;
static member GetAppearance : UIKit.UITraitCollection -> UIKit.UICollectionViewCell.UICollectionViewCellAppearance (requires 'T :> UIKit.UICollectionViewCell)

Jenis parameter

T

Jenis yang harus dikembalikan oleh proksi UIAppearance. Ini adalah subkelas UICollectionViewCell.

Parameter

traits
UITraitCollection

Koleksi sifat untuk dicocokkan.

Mengembalikan

objek proksi tampilan untuk jenis yang ditentukan.

Keterangan

Objek yang dikembalikan mewakili proksi UIAppearance di mana pengembang dapat mengatur properti penampilan untuk instans UICollectionViewCell.

Appearance Tidak seperti properti , atau AppearanceWhenContainedIn(Type[]) metode yang hanya berfungsi pada instans kelas khusus ini, proksi yang dikembalikan oleh GetAppearance dapat digunakan untuk mengubah gaya subkelas.

Contoh berikut menunjukkan cara kerja metode GetAppearance

var myTheme = UICollectionViewCell.GetAppearance<MyUICollectionViewCellSubclass> (myTraits, );
myTheme.TintColor = UIColor.Red;

Untuk informasi lainnya, lihat dokumentasi untuk metode UIAppearance.

Berlaku untuk

GetAppearance<T>(UITraitCollection, Type[])

Mendapatkan proksi UICollectionViewCell.UICollectionViewCellAppearance penampilan untuk subkelas UICollectionViewCell yang memiliki koleksi sifat yang ditentukan saat tampilan dihosting dalam hierarki yang ditentukan.

public static UIKit.UICollectionViewCell.UICollectionViewCellAppearance GetAppearance<T> (UIKit.UITraitCollection traits, params Type[] containers) where T : UIKit.UICollectionViewCell;
static member GetAppearance : UIKit.UITraitCollection * Type[] -> UIKit.UICollectionViewCell.UICollectionViewCellAppearance (requires 'T :> UIKit.UICollectionViewCell)

Jenis parameter

T

Jenis yang harus dikembalikan oleh proksi UIAppearance. Ini adalah subkelas UICollectionViewCell.

Parameter

traits
UITraitCollection

Koleksi sifat untuk dicocokkan.

containers
Type[]

Daftar jenis yang ingin dimiliki pengembang sebagai kontainer untuk menerapkan tampilan khusus ini.

Mengembalikan

objek proksi tampilan untuk jenis yang ditentukan.

Keterangan

Objek yang dikembalikan mewakili proksi UIAppearance di mana pengembang dapat mengatur properti tampilan untuk instans UICollectionViewCell yang memiliki koleksi sifat yang ditentukan saat tampilan dihosting dalam hierarki yang ditentukan ketika instans tersebut terkandung dalam hierarki yang ditentukan oleh containers parameter.

Appearance Tidak seperti properti , atau AppearanceWhenContainedIn(Type[]) metode yang hanya berfungsi pada instans kelas khusus ini, proksi yang dikembalikan oleh GetAppearance dapat digunakan untuk mengubah gaya subkelas.

Contoh berikut menunjukkan cara kerja metode GetAppearance

var myTheme = UICollectionViewCell.GetAppearance<MyUICollectionViewCellSubclass> (myTraits, typeof (UINavigationBar), typeof (UIPopoverController));
myTheme.TintColor = UIColor.Red;

Untuk informasi lainnya, lihat dokumentasi untuk metode UIAppearance.

Berlaku untuk