小编Kri*_*ris的帖子

更改UINavigationController NavigationBar的动画

现在我使用[self.navigationController setNavigationBarHidden:NO animated:YES];

导航栏从右到左飞,有没有办法从上到下放下它?

iphone animation uinavigationbar

5
推荐指数
1
解决办法
9445
查看次数

iOS自定义委托从viewController调用setDelegate后返回Nil

我在ARC中使用自定义委托类时遇到了一个奇怪的问题.在viewDidLad之后的viewcontroller中,我调用工具栏setDelegate方法并将viewcontroller指定为委托.

每当我尝试引用委托时,它都是零,即使在viewcontroller中设置之后也是如此.

//MPToolbar.h

#import <UIKit/UIKit.h>

//Define the protocol for the delegate
@class MPToolBar;
@protocol MPToolBarDelegate <NSObject>
@required
- (void)writeButtonSelected;
- (void)writeButtonDeSelected;
@end

@interface MPToolBar : UIView{
    id <MPToolBarDelegate> delegate;
}

@property(strong) UIButton *lastButton;

@property(strong) id <MPToolBarDelegate> delegate;
-(IBAction)buttonSelected:(id)sender;
-(void)resizeForOrientation:(UIInterfaceOrientation)orientation;

@end

//MPToolbar.m
#import "MPToolBar.h"

@implementation MPToolBar
@synthesize lastButton, delegate;

- (id)initWithFrame:(CGRect)frame
{
    if ((self = [super initWithFrame:frame])) {
        // Initialization code
    }
    NSArray *nibViews = [[NSBundle mainBundle] loadNibNamed:@"MPToolBar" owner:self options:nil];
    [self addSubview:[nibViews objectAtIndex:0]];
    return self;
}


#pragma button actions
-(IBAction)buttonSelected:(id)sender{
    UIButton …
Run Code Online (Sandbox Code Playgroud)

ios

1
推荐指数
1
解决办法
3462
查看次数

标签 统计

animation ×1

ios ×1

iphone ×1

uinavigationbar ×1