小编Raz*_*van的帖子

公共空中(OTA)iOS IPA文件分发?

我看到这家中国公司为他们的app/service提供了一个演示,这是一个"ipa"文件.您只需通过Safari访问iPhone链接,即可安装演示ipa文件.

链接位于iphone app下载按钮下方.

这让我想知道是什么阻止人们以这种方式在Apple应用商店外发布他们的应用.一个法律问题,但技术可以吗?

我也想知道他们使用的配置文件是什么,从XCode生成具有如此广泛的安装容量的这个ipa文件.就Ad Hoc发布配置文件而言,它只允许100个用户,仍然正确吗?这是我不知道的其他配置文件吗?我最好的猜测是,这是一个正常的enterprice安装,他们只是为世界上的每个人制作......他们可以吗?

我在我的iPhone 4上试过这个演示,它运行正常.登录页面上的左按钮是注册.右键是登录.尝试使用名称(使名称唯一)和密码注册,只要您可以获得成功消息.你可以登录.

ios ipa provisioning-profile

32
推荐指数
3
解决办法
5万
查看次数

具有关系属性性能问题的核心数据sectionNameKeyPath

我有一个核心数据模型,包括三个实体:
Person,Group,Photo它们之间的关系如下:

  • 人<< ----------->组(一对多关系)
  • 人<------------->照片(一对一)

当我使用NSFetchedResultsControllerin a 执行提取时UITableView,我想Person使用Group's entity name属性对对象进行分组.

为此,我用sectionNameKeyPath:@"group.name".

问题在于,当我使用Group关系中的属性时,在我滚动的时候,NSFetchedResultsController在小批量的20(我有setFetchBatchSize: 20)中提前取出所有内容而不是获取批次tableView.

如果我使用Person实体的属性(比如sectionNameKeyPath:@"name")来创建部分,一切正常:在NSFetchResultsController滚动时加载小批量的20个对象.

我用来实例化NSFetchedResultsController的代码:

- (NSFetchedResultsController *)fetchedResultsController {

    if (_fetchedResultsController) {
        return _fetchedResultsController;
    }

    NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init];
    NSEntityDescription *entity = [NSEntityDescription entityForName:[Person description]
                                              inManagedObjectContext:self.managedObjectContext];

    [fetchRequest setEntity:entity];

    // Specify how the fetched objects should be sorted
    NSSortDescriptor …
Run Code Online (Sandbox Code Playgroud)

core-data objective-c uitableview nsfetchedresultscontroller ios

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

具有动态宽度的UILabel - 水平对齐

我在UITableView中的自定义单元类中有一个UILabel,我使用以下代码来动态增加标签的宽度:

CGSize sizeToMakeLabel = [cell.cellResult.text sizeWithFont:cell.cellResult.font];

cell.cellResult.frame = CGRectMake(cell.cellResult.frame.origin.x, cell.cellResult.frame.origin.y, sizeToMakeLabel.width, sizeToMakeLabel.height);
Run Code Online (Sandbox Code Playgroud)

使用上面的代码出现的问题是,我不能再将标签右对齐(将其宽度增加到左边而不是右边).

如果我不使用上面的代码并在IB中将对齐设置为右,则对齐有效.但在这种情况下,我失去了动态宽度.

我尝试过:

cell.cellResult.textAlignment = UITextAlignmentRigth;
cell.cellResult.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin;
Run Code Online (Sandbox Code Playgroud)

但没有任何反应.

有人可以帮我解决这个问题吗?

xcode objective-c uilabel ios

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

NSMutableArray 获取 [__NSCFString count]:无法识别的选择器发送到实例

我真的需要一些帮助...

当我尝试使用 NSMutableArray 获取部分的单元格数时,我得到 [__NSCFString count]: unrecognized selector sent to instance 0x6d567e0

当我使用“rows = [[searchProfile objectAtIndex:section] count];”时会发生这种情况

这是代码:

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    NSLog(@"1");
    // _________ Return the number of sections ________
    int sections =  0;

    if (tableView == self.tableView)
    {
        sections = 2;
    }
    if (tableView == self.searchDisplayController.searchResultsTableView)
    {
        sections = [searchedProfile count];
    }
    return sections;
}


/* ------------------------------------------ Set The Number Of Cells for Each Section ------------------------------- */


- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    NSLog(@"2");

    // _________  Return the number …
Run Code Online (Sandbox Code Playgroud)

xcode objective-c uitableview nsmutablearray ios

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