UIColor/fr: Difference between revisions

From iPhone Development Wiki
m (Thai.)
m (Correction.)
 
Line 1: Line 1:
<small>'''Languages: [[UIColor|English]] &bull; français''' &bull; [[UIColor|ไทย]]</small>
<small>'''Languages: [[UIColor|English]] &bull; français''' &bull; '''[[UIColor/th|ไทย]]'''</small>


[[UIColor]] est une classe représentant une couleur solide ou un motif, similaires aux brosses dans Windows GDI.
[[UIColor]] est une classe représentant une couleur solide ou un motif, similaires aux brosses dans Windows GDI.

Latest revision as of 04:08, 18 May 2014

Languages: English • françaisไทย

UIColor est une classe représentant une couleur solide ou un motif, similaires aux brosses dans Windows GDI.

Couleurs prédéfinies

UIColor définit une liste de couleurs fréquemment consultés. Elles peuvent être reçu en utilisant +[UIColor someColor], listées comme ceci:


Couleurs solides

blackColor
0.000
darkGrayColor
0.333
lightGrayColor
0.667
whiteColor
1.000
grayColor
0.500
redColor
1.00, 0.00, 0.00
greenColor
0.00, 1.00, 0.00
blueColor
0.00, 0.00, 1.00
cyanColor
0.00, 1.00, 1.00
yellowColor
1.00, 1.00, 0.00
magentaColor
1.00, 0.00, 1.00
orangeColor
1.00, 0.50, 0.00
purpleColor
0.50, 0.00, 0.50
brownColor
0.60, 0.40, 0.20
clearColor
0.000 [0% alpha]
lightTextColor
1.000 [60% alpha]
darkTextColor
0.000

Couleurs solides non-documentées

tableSeparatorDarkColor
0.67, 0.67, 0.67
tableSeparatorLightColor
0.88, 0.88, 0.88
tableBackgroundColor
1.00, 1.00, 1.00
tableSelectionColor
0.16, 0.43, 0.83
sectionListBorderColor
0.52, 0.56, 0.58 [60% alpha]
sectionHeaderBackgroundColor
0.90, 0.93, 0.99 [80% alpha]
sectionHeaderOpaqueBackgroundColor
0.92, 0.94, 0.99
sectionHeaderBorderColor
0.85, 0.87, 0.91
tableCellBlueTextColor
0.22, 0.33, 0.53
tableCellGrayTextColor
0.50, 0.50, 0.50
textFieldAtomBlueColor
0.16, 0.34, 1.00
textFieldAtomPurpleColor
0.41, 0.00, 0.74
infoTextOverPinStripeTextColor
0.30, 0.34, 0.42
tableCellValue1BlueColor
0.22, 0.33, 0.53
tableCellValue2BlueColor
0.32, 0.40, 0.57
tableGroupedSeparatorLightColor
0.00, 0.00, 0.00 [18% alpha]
tableCellPlainBackgroundColor
1.00, 1.00, 1.00
tableCellGroupedBackgroundColor
0.97, 0.97, 0.97 (iPad) / 1.00, 1.00, 1.00 (iPhone)
tableShadowColor
1.00, 1.00, 0.91
tableGroupedTopShadowColor
0.00, 0.00, 0.00 [8% alpha]
selectionTintColor
0.00, 0.33, 0.65 [20% alpha]
textCaretColor
0.26, 0.42, 0.95 / 0.41, 0.31, 0.27 (MobileNotes)
selectionCaretColor
0.26, 0.42, 0.95
selectionHighlightColor
0.44, 0.66, 0.99 [18% alpha]
tableSelectionGradientStartColor
0.02, 0.55, 0.96
tableSelectionGradientEndColor
0.04, 0.37, 0.91

Motifs

UIColorPatterns.png pinStripeColor UIPinStripe.png
viewFlipsideBackgroundColor
(Public)
UIStockImageWidgetBacksideBackground.png
underPageBackgroundColor UIStockImageUnderPageBackground.png
noContentLightGradientBackgroundColor UIStockImageNoContentLightGradientBackgroundColor.png
noContentDarkGradientBackgroundColor UIStockImageNoContentDarkGradientBackgroundColor.png
scrollViewTexturedBackgroundColor
(Public)
UIStockImageScrollViewTexturedBackgroundColor.png

Note: les couleurs publiques +[UIColor scrollViewTexturedBackgroundColor] et +[UIColor groupTableViewBackgroundColor] retourne pinStripeColor sur iPhone et clearColor sur iPad.

Motifs personnalisés

Si les textures ou des couleurs par défaut ne conviennent pas, et vous ne voulez pas d'une couleur unie, un fichier image peut être chargé pour se comporter similairerement aux modèles ci-dessus via +[UIColor colorWithPatternImage:].

Si une image est trop petite de taille, l'OS va faire une miniature de l'image, et cette technque peut être utilisée afin de créer desfond d'écrans à partir de fichiers de petites images. Si une image est trop grosse, il dépassera de l'écran.

Couleurs CSS

Signature -(NSString*)styleString
Available in 2.0 –

UIColors peut être converti en couleurs CSS par la méthode -styleString. Par exemple, [[UIColor lightTextColor] styleString] donne @"rgba(255,255,255,153)".

Références