小编bah*_*aha的帖子

如何将数据从SQlite显示到表视图到iPhone应用程序

我正在使用SQlite3在Xcode 4.3中处理一个iPhone项目,SQlite和Xcode之间的连接已经完成,现在我想将我的数据显示到一个表视图(三个视图)并且只读它!所以我有主表视图,选择raw - > take to 2nd view并从DB中加载其他数据选择raw - >转到详细信息视图以显示长文本和图像!

任何帮助赞赏.

AppDelegate.h

#import "AppDelegate.h"

#import "MasterViewController.h"

@implementation AppDelegate

@synthesize window = _window;
@synthesize navigationController = _navigationController;

- (void)dealloc
{
    [_window release];
    [_navigationController release];
    [super dealloc];
}

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
    // Override point for customization after application launch.


    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,    NSUserDomainMask, YES);
    NSString *documentsDir = [paths objectAtIndex:0];

    NSString *dbPath = [documentsDir stringByAppendingPathComponent:@"cities.sqlite"];

    NSFileManager *fileManager = [NSFileManager defaultManager];

    BOOL …
Run Code Online (Sandbox Code Playgroud)

sqlite iphone sdk ios

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

标签 统计

ios ×1

iphone ×1

sdk ×1

sqlite ×1