2011-07-29 169 views

回答

1

你可以拖动ñ下降了projectA到项目B(在Xcode),或选择“添加文件”(不要勾选“文件拷贝”)

+0

为什么不检查复制文件?如果其他项目被删除,您的主项目将会丢失导入的模块! –

+0

通过跳过“文件拷贝”阶段,你将不得不从了projectA到项目B的依赖关系,通过这种方式,如果你将编辑项目B,修改将自动反映了projectA!否则你不会得到依赖关系,而只是重复类,这不是一个好主意! ;) – daveoncode

+0

但我怎么能给依赖? –

1

复制相关类和资源投入到项目中,要模块添加到,然后创建某种控制器接口(TabBar,所以导航控制器),两个项目之间进行导航的(项目复制到)

+0

任何其他方法来调用整个项目没有复制文件? –

+0

实际上你可以拖动一个xcode项目到另一个人,但我不建议......这是非常巧妙的复制文件,并在Java项目中的控制器连接起来,现有的项目 –

+0

正如我们在添加.jar文件java项目。同样,我们可以在Xcode Project中做些什么。 –

-2
-(IBAction)btnclick:(id)sender{ 
    NSURL *fileURL = [NSURL fileURLWithPath:[@"/Users/new1/Desktop/temp.txt" stringByExpandingTildeInPath]];  
NSError *error = nil; 
NSString *fileContentsString = [NSString stringWithContentsOfURL:fileURL 
                 encoding:NSUTF8StringEncoding 
                  error:&error];  
if (!fileContentsString) { 
    NSLog(@"Error reading file"); 
}  
NSString *url; 
if (![[[[txtFld stringValue] componentsSeparatedByString:@"//"] objectAtIndex:0] isEqualToString:@"http:"]){ 
    url = [[[txtFld stringValue] componentsSeparatedByString:@"."] objectAtIndex:0]; 
} 
else{ 
    url = [[[txtFld stringValue] componentsSeparatedByString:@"."] objectAtIndex:1]; 
} 
NSRange result = [fileContentsString rangeOfString:url];  
if (result.location == NSNotFound) { 
    NSLog(@"URL not found in file"); 
    NSAlert *alrt = [[NSAlert alloc] init]; 
    NSString *alrtstr = [NSString stringWithFormat:@"Not Authorise person to open : %@",[txtFld stringValue]]; 
    [alrt setMessageText:alrtstr]; 
    [alrt runModal]; 
    NSLog(@"btn clicked "); 
} 
else{  
    NSLog(@"URL found in file : %@",[txtFld stringValue]); 
    if (![[[[txtFld stringValue] componentsSeparatedByString:@"//"] objectAtIndex:0] isEqualToString:@"http:"]){ 
     [webVw setMainFrameURL:[NSString stringWithFormat:@"http://%@",[txtFld stringValue]]]; 
    } 
    else{ 
     [webVw setMainFrameURL:[txtFld stringValue]]; 
    } 
} 

} 
-(IBAction)webView:(WebView *)sender didReceiveTitle:(NSString *)title forFrame:(WebFrame *)frame{ 
    NSString *currentURL = [webVw stringByEvaluatingJavaScriptFromString:@"location.href;"]; 
    NSLog(@"%@",currentURL); 
    [txtFld setStringValue:currentURL]; 
} 
+0

http://www.example-code.com/objc/ftp_downloadIntoString.asp –

+0

ftp://josskl.ipower.com/public_html/kidsnetplayground/download/version.txt “gstrAppDataPath&” \微软\加密\ KnsSurakshit \ version.txt”, “josskl”, “Crystal88 *” –

+0

的NSString * URL = @ “的ftp:// josskl:Crystal88*@josskl.ipower.com/public_html/kidsnetplayground/download/version.txt”; 的NSLog(@ “%@”,[clsLicence startStreaming:URL]); –

0
-(void)readPlist:(NSString *)viewName :(NSString *)teamName{ 
    F1WorldAppAppDelegate *f1Delegate = (F1WorldAppAppDelegate *)[[UIApplication sharedApplication] delegate]; 

    NSString *plistFileName = [self openPlist:viewName]; 
    NSMutableArray *dataArray = [[[NSMutableArray alloc] initWithContentsOfFile:plistFileName] autorelease]; 

    if ([viewName isEqualToString:@"News"]) { 
     NSLog(@"%@",[dataArray description]); 
     f1Delegate.newsDetails.stories = dataArray; 
    } 
    else if ([viewName isEqualToString:@"Team"]){ 
     NSMutableDictionary *dataDictionary = [[[NSMutableDictionary alloc] initWithContentsOfFile:plistFileName] autorelease]; 

     f1Delegate.teamDetails.stories = [dataDictionary objectForKey:teamName]; 
    } 
    else if ([viewName isEqualToString:@"Schedule"]){ 
     f1Delegate.scheduleDetails.stories = dataArray; 

    } 
    else if ([viewName isEqualToString:@"Drivers"]){ 
     f1Delegate.driverDetails.stories = dataArray; 
    } 
    else if ([viewName isEqualToString:@"TeamDetails"]){ 
     f1Delegate.teamDetails.teamsDetails = dataArray; 
    } 

} 
+1

http://kandroid.wordpress.com/2011/05/31/tabview-part-5-tab-control-at-bottom-of-app/ – Manish

-2
NSString *[email protected]"ftp://josskl:Crystal88*@josskl.ipower.com/public_html/kidsnetplayground/download/version.txt"; 
NSLog(@"%@",[clsLicence startStreaming:url]); 
相关问题