UIKit Data Types Reference

Framework
UIKit/UIKit.h
Declared in
UIDataDetectors.h
UIGeometry.h
UIInterface.h

Overview

The UIKit framework defines data types that are used in multiple places throughout the framework.

Data Types

UIBarStyle

Defines the stylistic appearance of different types of views.

typedef enum {
   UIBarStyleDefault          = 0,
   UIBarStyleBlack            = 1,
   
   UIBarStyleBlackOpaque      = 1, // Deprecated
   UIBarStyleBlackTranslucent = 2, // Deprecated
} UIBarStyle;
Constants
UIBarStyleDefault

Use the default style normally associated with the given view. For example, navigation bars typically use a white background with dark content.

Available in iOS 2.0 and later.

Declared in UIInterface.h.

UIBarStyleBlack

Use a black background with light content.

Available in iOS 3.0 and later.

Declared in UIInterface.h.

UIBarStyleBlackOpaque

Deprecated. Use UIBarStyleBlack instead.

Available in iOS 2.0 and later.

Declared in UIInterface.h.

UIBarStyleBlackTranslucent

Deprecated. Use UIBarStyleBlack and set the translucent property to YES instead.

Available in iOS 2.0 and later.

Declared in UIInterface.h.

Availability
  • Available in iOS 2.0 and later.
Declared In
UIInterface.h

UIDataDetectorTypes

Defines the types of information that can be detected in text-based content.

enum {
   UIDataDetectorTypePhoneNumber   = 1 << 0,
   UIDataDetectorTypeLink          = 1 << 1,
   UIDataDetectorTypeAddress       = 1 << 2,
   UIDataDetectorTypeCalendarEvent = 1 << 3,
   UIDataDetectorTypeNone          = 0,
   UIDataDetectorTypeAll           = NSUIntegerMax
};
typedef NSUInteger UIDataDetectorTypes;
Constants
UIDataDetectorTypePhoneNumber

Detect strings formatted as phone numbers.

Available in iOS 3.0 and later.

Declared in UIDataDetectors.h.

UIDataDetectorTypeLink

Detect strings formatted as URLs.

Available in iOS 3.0 and later.

Declared in UIDataDetectors.h.

UIDataDetectorTypeAddress

Detect strings formatted as addresses.

Available in iOS 4.0 and later.

Declared in UIDataDetectors.h.

UIDataDetectorTypeCalendarEvent

Detect strings formatted as calendar events.

Available in iOS 4.0 and later.

Declared in UIDataDetectors.h.

UIDataDetectorTypeNone

Do no data detection.

Available in iOS 3.0 and later.

Declared in UIDataDetectors.h.

UIDataDetectorTypeAll

Detect all available types of data.

Available in iOS 3.0 and later.

Declared in UIDataDetectors.h.

Availability
  • Available in iOS 3.0 and later.
Declared In
UIDataDetectors.h

UIEdgeInsets

Defines inset distances for views.

typedef struct {
   CGFloat top, left, bottom, right;
} UIEdgeInsets;
Discussion

Edge inset values are applied to a rectangle to shrink or expand the area represented by that rectangle. Typically, edge insets are used during view layout to modify the view’s frame. Positive values cause the frame to be inset (or shrunk) by the specified amount. Negative values cause the frame to be outset (or expanded) by the specified amount.

See also UIEdgeInsetsMake and UIEdgeInsetsZero.

Availability
  • Available in iOS 2.0 and later.
Declared In
UIGeometry.h

UIOffset

Defines a structure that specifies an amount to offset a position.

typedef struct UIOffset {
   CGFloat horizontal, vertical
} UIOffset;
Discussion

The components are positive for right or down, negative for left or up.

See also UIOffsetMake and UIOffsetZero.

Availability
  • Available in iOS 5.0 and later.
Declared In
UIGeometry.h