TelephonyUI.framework

From iPhone Development Wiki
Revision as of 23:11, 4 February 2012 by Otium (talk | contribs) (Created page with 'The Telephony UI is a private framework, includes the iOS "Slide to ..." views(powering off, unlock bar). Since iOS 5 Apple has made changes to accommodate the new notifications …')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The Telephony UI is a private framework, includes the iOS "Slide to ..." views(powering off, unlock bar). Since iOS 5 Apple has made changes to accommodate the new notifications system.

TPBottomLockBar

The slide to... view

Usage: Subclassing

+ (float)defaultLabelFontSize {
//default font size for the label
return 20.0f;
}


- (id)initWithFrame:(struct CGRect)arg1 knobImage:(UIImage *)arg2  {
    if((self = [super initWithFrame:arg1 knobImage:arg2])) {
        
    }
    return self;
}
- (BOOL)allowsTouchTrackingBeyondVerticalThreshold {
//allows for continuation of tracking if the UITouch strays outside the view
    return YES;
}
- (BOOL)usesBackgroundImage {
    //Use the default background image, the background to the slide to unlock view on the lock screen
    return NO;
}
- (void)unlock {
//When the user has completed the unlock gesture
}
- (id)wellImageName {
    // the well image that the knob slides in, images are inside of the TelephonyUI.framework
    //this is the background image used in the notifications on the lockscreen
    return @"BulletinWellLock";
}
- (float)knobTrackInsetLeft {
   //set the inset of where the knob view starts, based off it's superview
    return 18.0f;
}
- (float)knobTrackInsetRight {
  //set the where the knob finishes, when it slides all the way
    return 18.0f;

}
- (float)_calcKnobYOffset {
  // move the knob up or down
return 0.0f;
}
- (void)downInKnob {
  //When the user presses down on the knob
}
- (void)upInKnob {
  //user lifts up on knob
}

Usage: Text Label

the text label includes features such as the animating text, and multiple label cycling
//to set one label
[myTPBottomLockBar setLabel:@"blah blah blah"];

//to set multiple labels
[myTPBottomLockBar setLabels:[NSArray arrayWithObjects:@"Label 1",@"Label 2", @"Label 3",nil]];

//cycling labels
[myTPBottomLockBar startCyclingLabels];

[myTPBottomLockBar stopCyclingLabels];

[myTPBottomLockBar cycleToNextLabel];

[myTPBottomLockBar cycleToLabelAtIndex:index];

//text animation
[myTPBottomLockBar startAnimating];

[myTPBottomLockBar stopAnimating];

//set font size
[myTPBottomLockBar setFontSize:20.0f];