Тег ‘UITabBar’:

Make gradient on iPhone/iPad

It’s easy! As of iPhone SDK 3.0, custom gradients can be implemented very easily, without subclassing or images, by using the new CAGradientLayer
add framework
#import < QuartzCore/QuartzCore.h>

so, example:

Теги: , , , , , ,

Комментарии отсутствуют

Custom change orientation

Solution for change orientation with uitabbar and others exeptions.
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didOrientation:) name:@"UIDeviceOrientationDidChangeNotification" object:nil];

And method
- (void) didOrientation: (id)object {
   
    UIInterfaceOrientation interfaceOrientation = [[object object] orientation];
 
    if (interfaceOrientation == UIInterfaceOrientationPortrait || interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown) {
   
        self.view.transform = CGAffineTransformMakeRotation(0);
    } [...]

Теги: , , , , , ,

Комментарии отсутствуют

Hide UITabBarController/UITabBar with animation.

Hide UITabBarController/UITabBar with animation.
BOOL hiddenTabBar;
UITabBarController *tabBarController;
 
- (void) hidetabbar {
   
    [UIView beginAnimations:nil context:NULL];
    [UIView setAnimationDuration:0.5];
   
    for(UIView *view in tabBarController.view.subviews)
    {
        NSLog(@"%@", view);
       
        if([view isKindOfClass:[UITabBar class]])
        {
           
        [...]

Теги: , , , ,

Комментариев (8)

Rewrite UITabBar and UITabBarItem iPhone

Вариант 1
Вкратце о чем нужно помнить!
Самое главное, если вы используете какие-то переменные из приват фреймверков и для них не прописаны property, обязательно пропишите! Иначе при компиляции на эти переменные будет ругаться компилятор к примеру так:
"_OBJC_IVAR_$_UITabBarItem._selectedImage", referenced from:
_OBJC_IVAR_$_UITabBarItem._selectedImage$non_lazy_ptr in UICategory.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

Рассказывать тут не очем кроме quartz, но о нем [...]

Теги: , , , , , ,

Комментариев (4)