美文网首页
琐碎知识点

琐碎知识点

作者: Boy_iOS | 来源:发表于2016-05-30 16:23 被阅读53次

文字对齐方式

/* Values for NSTextAlignment */
typedef NS_ENUM(NSInteger, NSTextAlignment) {
    NSTextAlignmentLeft      = 0,    // Visually left aligned
#if TARGET_OS_IPHONE
    NSTextAlignmentCenter    = 1,    // Visually centered
    NSTextAlignmentRight     = 2,    // Visually right aligned
#else /* !TARGET_OS_IPHONE */
    NSTextAlignmentRight     = 1,    // Visually right aligned
    NSTextAlignmentCenter    = 2,    // Visually centered
#endif
    NSTextAlignmentJustified = 3,    // (合理对齐)Fully-justified. The last line in a paragraph is natural-aligned.
    NSTextAlignmentNatural   = 4,    // 默认对齐方式;自然对齐
} NS_ENUM_AVAILABLE_IOS(6_0);

文本框文字预判

typedef NS_OPTIONS(NSUInteger, UIDataDetectorTypes) {
    UIDataDetectorTypePhoneNumber                              = 1 << 0,          //电话 Phone number detection
    UIDataDetectorTypeLink                                     = 1 << 1,          // 网址 URL detection
    UIDataDetectorTypeAddress NS_ENUM_AVAILABLE_IOS(4_0)       = 1 << 2,          // 地址 Street address detection
    UIDataDetectorTypeCalendarEvent NS_ENUM_AVAILABLE_IOS(4_0) = 1 << 3,          // 日历事件 Event detection

    UIDataDetectorTypeNone          = 0,               // No detection at all
    UIDataDetectorTypeAll           = NSUIntegerMax    // All types
} __TVOS_PROHIBITED;

视图内容显示模式

typedef NS_ENUM(NSInteger, UIViewContentMode) {
    UIViewContentModeScaleToFill,
    UIViewContentModeScaleAspectFit,      // contents scaled to fit with fixed aspect. remainder is transparent
    UIViewContentModeScaleAspectFill,     // contents scaled to fill with fixed aspect. some portion of content may be clipped.
    UIViewContentModeRedraw,              // (需要重绘)redraw on bounds change (calls -setNeedsDisplay)
    UIViewContentModeCenter,              // contents remain same size. positioned adjusted.
    UIViewContentModeTop,
    UIViewContentModeBottom,
    UIViewContentModeLeft,
    UIViewContentModeRight,
    UIViewContentModeTopLeft,
    UIViewContentModeTopRight,
    UIViewContentModeBottomLeft,
    UIViewContentModeBottomRight,
};

键盘显示类型

typedef NS_ENUM(NSInteger, UIKeyboardAppearance) {
    UIKeyboardAppearanceDefault,          // Default apperance for the current input method.
    UIKeyboardAppearanceDark NS_ENUM_AVAILABLE_IOS(7_0),
    UIKeyboardAppearanceLight NS_ENUM_AVAILABLE_IOS(7_0),
    UIKeyboardAppearanceAlert = UIKeyboardAppearanceDark,  // Deprecated
};

键盘类型

typedef NS_ENUM(NSInteger, UIKeyboardType) {
    UIKeyboardTypeDefault,                // Default type for the current input method.
    UIKeyboardTypeASCIICapable,           // Displays a keyboard which can enter ASCII characters, non-ASCII keyboards remain active
    UIKeyboardTypeNumbersAndPunctuation,  // Numbers and assorted punctuation.
    UIKeyboardTypeURL,                    // A type optimized for URL entry (shows . / .com prominently).
    UIKeyboardTypeNumberPad,              // A number pad (0-9). Suitable for PIN entry.
    UIKeyboardTypePhonePad,               // A phone pad (1-9, *, 0, #, with letters under the numbers).
    UIKeyboardTypeNamePhonePad,           // A type optimized for entering a person's name or phone number.
    UIKeyboardTypeEmailAddress,           // A type optimized for multiple email address entry (shows space @ . prominently).
    UIKeyboardTypeDecimalPad NS_ENUM_AVAILABLE_IOS(4_1),   // A number pad with a decimal point.
    UIKeyboardTypeTwitter NS_ENUM_AVAILABLE_IOS(5_0),      // A type optimized for twitter text entry (easy access to @ #)
    UIKeyboardTypeWebSearch NS_ENUM_AVAILABLE_IOS(7_0),    // A default keyboard type with URL-oriented addition (shows space . prominently).

    UIKeyboardTypeAlphabet = UIKeyboardTypeASCIICapable, // Deprecated

};

相关文章

  • 琐碎知识点

    创建线程池的三种方式: public static ExecutorService newSingleThread...

  • 琐碎知识点

    透明的dialog 在代码中这么设置 在上图中的dialog布局样式可自定义,在一段文字中给某部分文字加颜色可以使...

  • 琐碎知识点

    1.自定义控件时,可以通过TypedArray attrs获取布局文件中设置的属性值。再获取某一条属性值前,可以通...

  • 琐碎知识点

    文字对齐方式 文本框文字预判 视图内容显示模式 键盘显示类型 键盘类型

  • 琐碎知识点

    1、android 读取Bitmap的几种方式 1.以文件流的方式,假设在sdcard下有 test.png图片 ...

  • 琐碎知识点总结

    一、StringBuilder的容量capacity

  • [Android]琐碎知识点

    横竖屏中遇到的问题   项目中很少手机出现此情况,但是还是遇到了——红米3和VIVO中的一款(5.0系统)。具体情...

  • iOS琐碎知识点一

    1、使用动画切换window的根控制器 2、KVO高级用法 适用于NSArray,可以实现对数据元素的求和、最大值...

  • iOS琐碎的知识点

    0.分割线 [self.TableViewAccount setSeparatorInset:UIEdgeInse...

  • iOS 琐碎小知识点

    隐藏状态栏 [[UIApplication shareApplication] setStatusBarHidde...

网友评论

      本文标题:琐碎知识点

      本文链接:https://www.haomeiwen.com/subject/caqcdttx.html