Tag: 参考

UITableViewCell作为参数不是副本?

也许现在还为时过早,但是我得到了一些我无法遵循的代码。 在一个UITableViewController是以下 override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { let cell = printTable.dequeueReusableCellWithIdentifier("printCell", forIndexPath: indexPath) as UITableViewCell configureTestCell(cell, atIndexPath: indexPath) return cell; } configureTestCell函数: func configureTestCell(cell: UITableViewCell, atIndexPath indexPath: NSIndexPath) { let printCell = cell as PrintCell if (self.searchActive) { printCell.nameLabel.text = "Project \(filteredData[indexPath.item])" } else { printCell.nameLabel.text = "Project \(printData[indexPath.item])" } […]

Xamarin Studio iOS程序集错误

当我更新我的Xamarin工作室(iOS)时,它会给我这个错误,当试图build立/debugging。 我不知道如何解决这个问题,将不胜感激一些帮助 错误: The type 'MonoTouch.UIKit.UIView' is defined in an assembly that is not referenced. Consider adding a reference to assembly 'monotouch, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' 我正在使用“AlexTouch.MBProgressHUD.dll”,我已经添加到我的使用。

查找对System.IO.FileSystem.Watcher.dll的引用

我有一个Xamarin Forms跨平台解决scheme。 当我构build解决scheme时,iOS项目无法parsing引用:C:/ Program Files(x86)/ Reference Assemblies / Microsoft / Framework / Xamarin.iOS / v1.0 / Facades / System.IO.FileSystem.Watcher。即使它在那里实际上。 所有其他项目build立得很好。 我找不到在解决scheme文件中任何位置的DLL或类的引用。 我不需要这个能力。 想法? 谢谢。

NSManagedObjectContext executeFetchRequest返回不稳定的对象,导致EXC_BAD_ACCESS,SIGABRT等

我的猜测是我在这里错过了一些核心数据的基本理解,但在这里: 我在我的应用程序中有几个提取请求来处理不同事情的检索。 在某些情况下,代码运行正常,返回请求的对象。 在某些情况下,它会返回看起来已经被释放的对象(例如,稍后尝试引用返回的结果给出EXC_BAD_ACCESS)的几行代码。 当我在代码中设置各种断点和日志语句并逐步完成时,还会在代码中的其他位置获得偶然的SIGABRT或EXC_BAD_ACCESS。 在任何情况下,似乎是在我参考提取请求的结果时。 下面是一个这样的获取请求的示例: // Who am I? NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; NSString *signedInPersonId = [defaults stringForKey:@"signedInPersonId"]; // Return (if any) the Request object with given UUID RequestStrings *r = [[RequestStrings alloc] init]; NSEntityDescription *description = [NSEntityDescription entityForName:r.table_Request inManagedObjectContext:moc]; NSPredicate *predicate = [NSPredicate predicateWithFormat:@"(UUID == %@) && (dataOwnerId == %@)", UUID, […]

dismissViewControllerAnimated崩溃在ios5

由于循环引用,代码是否会崩溃? MenuController: UIViewController – (id)initWithNibName: {… TabsController *tabs = [[TabsController alloc] initWithNibName:@"TabsController" bundle:nil]; self.tab = tabs; …. } //button pressed: – (IBAction)showPrefFromMenu:(id)sender { // todo change delegate!? tab.tabDelegate = self; [self presentModalViewController:tab animated:YES]; //[tab release]; } // delegate method: -(void)myViewDismissed { …. NSLog(@"tab references: %d", [tab retainCount]) ; [self dismissModalViewControllerAnimated:YES];//crash … } 模态/子类: TabsController : […]