TPKeyboardAvoidingScrollView

TPKeyboardAvoidingScrollView

嗨,我在github中找到TPKeyboardAvoidingScrollView,我按照说明进行操作,但是没有用

#import "ajouterBilanViewController.h"
#import "TPKeyboardAvoidingScrollView.h"

@interface ajouterBilanViewController ()

@end

@implementation ajouterBilanViewController
@synthesize scroll;
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
    // Custom initialization
}
return self;
}
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end

我在我的xib中添加了滚动视图,并使用TPKeyboardAvoidingScrollView更改了uiscrollview
但没有任何效果。
#import <UIKit/UIKit.h>
@class TPKeyboardAvoidingScrollView;
@interface ajouterBilanViewController : UIViewController
 @property (weak, nonatomic) IBOutlet TPKeyboardAvoidingScrollView *scroll;
 @end

最佳答案

这是如何使它起作用,

希望这个能对您有所帮助..


REST将由TPKeyboardAvoidingScrollView为您管理

09-07 13:31