我尝试将字符串设置为
button.titlelabel.text
Run Code Online (Sandbox Code Playgroud)
例如我设置'ISTANBUL'
它看起来像'IST...'
我怎么解决这个问题.我想写所有的字符'ISTANBUL'.
我尝试只将两个整数变量插入到我的sqlite数据库中.我创建了一个名为ups.sqlite的数据库,它有一个表(upssTable),表有两列.但是,当我打开/用户/ DS /库/应用程序支持/ iPhone模拟器/ 5.0 /应用/ FCB4B455-4B7F-4C47-81B6-AC4121874596/SqliteDeneme.app/ups.sqlite存在ups.sqlite没有数据.我的代码在这里:
- (IBAction)buttonClick:(id)sender {
NSFileManager *fileManager = [NSFileManager defaultManager];
NSError *error;
NSString *dbPath = [self getDBPath];
BOOL success = [fileManager fileExistsAtPath:dbPath];
if(!success) {
NSString *defaultDBPath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"ups.sqlite"];
success = [fileManager copyItemAtPath:defaultDBPath toPath:dbPath error:&error];
if (!success)
NSAssert1(0, @"Failed to create writable database file with message '%@'.", [error localizedDescription]);
}
NSLog(@"database path %@",dbPath);
if(!(sqlite3_open([dbPath UTF8String], &cruddb) == SQLITE_OK))
{
NSLog(@"An error has occured.");
}
if(sqlite3_open([dbPath UTF8String], &cruddb) ==SQLITE_OK){
NSString * str1 =@"1";
NSString …Run Code Online (Sandbox Code Playgroud)