小编Lou*_*kas的帖子

不兼容的指针类型,使用类型为UItableViewCell的表达式初始化"CustomCellView*"

你能帮我理解和/解决下面的错误.我不明白这CustomCellView是一个子类UItableViewCell.代码被编译但警告仍然存在:

Incompatible pointer type initializing 'CustomCellView *' with an expression of type `UItableViewCell`
Run Code Online (Sandbox Code Playgroud)

我得到了第二行高亮度:

static NSString *CellIdentifier = @"CustomCell";
CustomCellView *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
Run Code Online (Sandbox Code Playgroud)

iphone uitableview ios4 ios

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

mach_vm_map失败(错误代码= 3)

在我的iPAD应用程序导航一段时间后,我注意到应用程序的响应速度越来越慢,最后我的应用程序崩溃,出现以下错误

    AppName(1779,0x3d12d18c) malloc: *** mach_vm_map(size=167936) failed (error code=3)
    *** error: can't allocate region
    *** set a breakpoint in malloc_error_break to debug
    Jan  7 11:34:30  AppName[1779] <Error>:   at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr) <0xffffffff>
    Jan  7 11:34:30  AppName[1779] <Error>:   at MonoTouch.UIKit.UIApplication.Main (string[],string,string) <0x0012b>
    Jan  7 11:34:30  AppName[1779] <Error>:   at AppName.Application.Main (string[]) <0x0002f>
    Jan  7 11:34:30  AppName[1779] <Error>:   at (wrapper runtime-invoke) object.runtime_invoke_dynamic (intptr,intptr,intptr,intptr) <0xffffffff>
Run Code Online (Sandbox Code Playgroud)

这是一个与记忆有关的问题吗?

crash malloc xamarin.ios xamarin

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

UITextField在UITableView中委托

G'day伙计们,我正在构建一个允许用户快速输入数字的应用程序UITableView.

我目前已经构建了这个框架,但是我有点想法让键盘加载并使单元格中的文本可以通过用户操作进行编辑.

我记得在某个地方的开发代码中有一个iOS示例(就像一年前那样它不会在NDA下),你在其中添加了项目并在UITableView没有详细子视图的情况下编辑它们.

只需要提示如何连接代理,或者如何构造代码.

iphone tableview

4
推荐指数
1
解决办法
6366
查看次数

UITableView iOS中的sectionForSectionIndexTitle

我刚刚开始使用ios,而且我很困惑UITableView.

我想在视图的右侧实现索引栏.我已经实现了这个,但当我点击索引栏上的部分时,它无法正常工作.

这是我的代码.这indexArray是"AZ"元素,finalArray是我的UITableView可变数组.

请告诉我应该实施什么sectionForSectionIndexTitle.

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    return [finalArray count];
}

- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:         (NSInteger)section
{
    return [finalArray objectAtIndex:section];
}

- (NSArray *)sectionIndexTitlesForTableView:(UITableView *)tableView
{
    return indexArray;
}

- (NSInteger)tableView:(UITableView *)tableView sectionForSectionIndexTitle:   (NSString *)title atIndex:(NSInteger)index
{

}
Run Code Online (Sandbox Code Playgroud)

tableview ios

4
推荐指数
1
解决办法
6258
查看次数

UIBarButtonItems 以错误的顺序出现

我有一个带有单个 UIViewController 的单触摸测试应用程序。我想添加 3 个 UIBarButtonItems

    UIBarButtonItem b1 = new UIBarButtonItem(UIBarButtonSystemItem.Action);
    UIBarButtonItem b2 = new UIBarButtonItem(UIBarButtonSystemItem.Add);
    UIBarButtonItem b3 = new UIBarButtonItem(UIBarButtonSystemItem.Bookmarks);

    this.NavigationItem.SetRightBarButtonItems(new [] {b1,b2,b3}, true);
Run Code Online (Sandbox Code Playgroud)

不幸的是,它们出现的顺序错误。首先我看到 b3,然后是 b2,最后是 b1。我想要实现的目标是让 UIBarButtonItems 按以下顺序出现 b1、b2、b3。

难道我做错了什么?

uibarbuttonitem xamarin.ios ios

2
推荐指数
1
解决办法
478
查看次数

永远不会调用WillTerminate事件

我的iOS应用程序有问题.

当我从iOS任务栏中杀死应用程序时,WillTerminate事件未被调用....任何想法为什么?

我设置的唯一后台服务是voip SetKeepAliveTimeout Timer(在info.plist中带有"voip"标志).但即使我拿出这个,WillTerminate事件永远不会被解雇.

我还在DidEnterBackground事件上注册了SignificantLocationChanges .

有任何想法吗?

谢谢

xamarin.ios ios

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

iOS tableview数据更改

我有一个UITableView没有问题的方法.如果我去设置页面,更改一些设置并返回我的rootview我用新设置调用方法,但我的UITableView显示始终是最后的值.有帮助吗?

iphone uitableview tableview

0
推荐指数
1
解决办法
1337
查看次数