1
当用户轻击文本字段时,通常闪烁的指示器显示他们正在输入该iOS UITextField。但是,在这个视图控制器上它没有。奇怪的是,当我在不同的视图控制器上使用相同的代码时,它确实出现了。UITextField无法提供指标
@interface MainViewController()
{
UITextField *fldye;
}
fldye = [[UITextField alloc] initWithFrame:CGRectMake(165, 180, 140, 25)];
fldye.placeholder = @"Year";
fldye.keyboardType = UIKeyboardTypeNumberPad;
[fldye setBackgroundColor:[UIColor whiteColor]];
[fldye.layer setCornerRadius:5.0f];
[fldye.layer setMasksToBounds:YES];
[fldye setTextColor:[UIColor blackColor]];
fldye.TextAlignment=NSTextAlignmentCenter;
NSUserDefaults *defaujetzb = [NSUserDefaults standardUserDefaults];
NSString *labsterzb = [defaujetzb objectForKey:@"mypreviousaddedyear"];
fldye.text = labsterzb;
这是我加入的图书馆...
#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
#import "Cellmain.h"
#import "Celleventmain.h" //I have two tableviews present on this controller as opposed to others
#import <MessageUI/MessageUI.h>
#import <iAd/iAd.h>
#import <StoreKit/StoreKit.h>
#import <FacebookSDK/FacebookSDK.h>
#import <AVFoundation/AVFoundation.h>
#import <AssetsLibrary/AssetsLibrary.h>
#import <CoreLocation/CoreLocation.h>
#import <MapKit/MapKit.h>
#import <CoreLocation/CoreLocation.h>
#import "AppDelegate.h"
#import <Social/Social.h>
#import <Accounts/Accounts.h>
@interface MainViewController : UIViewController <MFMailComposeViewControllerDelegate, NSXMLParserDelegate, UIImagePickerControllerDelegate, UITableViewDelegate, UITableViewDataSource, ADBannerViewDelegate, UIActionSheetDelegate, SKStoreProductViewControllerDelegate, CLLocationManagerDelegate, UITextFieldDelegate>