我有数据导出到excel它工作正常.但我有一个小问题
我的输出像这样导出:

我想要发生的是:

这是我要导出的代码:
-(void)exportCSV {
NSArray * data = [NSArray arrayWithObjects:entries,keys, nil];
NSLog(@"%@",data);
csv =[NSMutableString string];
for (NSArray * line in data) {
NSMutableArray * formattedLine = [NSMutableArray array];
for ( field in line) {
BOOL shouldQuote = NO;
NSRange r = [field rangeOfString:@","];
//fields that contain a , must be quoted
if (r.location != NSNotFound) {
shouldQuote = YES;
}
r = [field rangeOfString:@"\""];
//fields that contain a " must have them escaped to "" and be quoted …Run Code Online (Sandbox Code Playgroud) 我想在UITextfield中添加一个清除按钮,但它不显示.
这是UITextfield的代码:
@implementation databaseEnterDataViewController
@synthesize customer = customer_ ;
@synthesize type = type_ ;
@synthesize code1 = code1_ ;
@synthesize code2 = code2_ ;
@synthesize background,
changeType,
codeOne,
codeTwo,
customers,
suspendDisplayInfo,
tf;
#pragma mark -
#pragma mark Initialization
#pragma mark -
#pragma mark View lifecycle
- (void)viewDidLoad {
[super viewDidLoad];
self.customer = @"" ;
self.type = @"" ;
self.code1 = @"" ;
self.code2 = @"" ;
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithTitle:@"Save" style:UIBarButtonSystemItemCancel target:self action:nil];
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:nil];
self.navigationItem.title …Run Code Online (Sandbox Code Playgroud) 我为iPhone做了一个应用程序,我使用的是UIStoryboard.
当应用程序启动时,我有一个看起来像这样的视图

当我按下Button1标签Code 2:并且textfield必须消失时我尝试了该setHidden方法
这就是发生的事情

但我想要发生的是这个

我该怎么办?
ios ×3
iphone ×2
button ×1
csv ×1
export ×1
layout ×1
objective-c ×1
uitableview ×1
uitextfield ×1