2011-07-29 170 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]); 
相關問題