小编Joe*_*nni的帖子

构建以前的iOS版本

可能重复:
Xcode 4.2 Lion未在旧设备上安装/运行项目.iPhone 3G 4.2.1

我投降.删除xCode 4.1并安装4.2后,我无法在运行iOS 4.2.1的开发设备上构建和运行.(iPad/iPhone模拟器只显示4.3和5.0)当我们从3.2.1移动到iOS 4.0时,我没有遇到问题.

我将部署目标设置为3.0,将基本sdk设置为最新的iOS(iOS 5.0)在构建选项下我尝试设置LLVM 3.0和GCC 4.2没有任何区别.它编译并说它已经在设备上运行 - 尽管它还没有.

我错过了什么?

xcode ios

8
推荐指数
0
解决办法
672
查看次数

iad banner - 每个应用程序一个实例或每页一个实例

为我的应用程序提供一个和iAd的共享实例是否更合适?或者我可以在导航应用程序的每个页面上创建一个新实例吗?Apple的示例代码似乎只有一个广告,每个页面使用一个广告.从我的角度来看,更多广告意味着更多钱 以这种方式做这件事还是我看错了吗?

objective-c ios iad

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

UIcollectionView cellForItemAtIndexPath仅在iOS 10中返回Null.适用于iOS 9和iOS 8

我有一个应用程序,愉快地运输了几年.它在UICollectionView中检索RSS源.cellForItemAtIndexPath方法设置文本并调用数据源方法以从源中指定的链接加载图像.如果不存在,则加载网页数据并搜索<img>标签以获取图像.找到/加载图像后,调用委托方法将图像添加到单元格.(下面)

当在iOS 8和9中运行时,一切都很开心,但是当在iOS 10中运行时,可视单元格在最初加载RSS源时用图像更新但滚动时没有添加图像,我从cellForItemAtIndexPath获得NULL.

当我向后滚动时显示图像,如果我向imageWasLoadedForStory添加reloadItemsAtIndexPaths但是reloadItemsAtIndexPaths会破坏性能,则会显示图像.

- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
           // ...    

          if (story.thumbnail) {
          [imageView setAlpha: 1.0];
          imageView.image = story.thumbnail;
          UIActivityIndicatorView *lActivity = (UIActivityIndicatorView *) [collectionView viewWithTag: 900];
          [lActivity removeFromSuperview];
          }else{
               [story setDelegate: self];
               [story findArticleImageForIndexPath: indexPath];
          }
          //  ...
}



//delegate method.  Called when image has been loaded for cell at specified indexpath

- (void) imageWasLoadedForStory: (RSSStory *) story forIndexPath: (NSIndexPath *) indexPath
{
        //get cell
        CustomCollectionViewCell *customCell = (id) [self.collectionview cellForItemAtIndexPath: indexPath];

        NSLog(@"imageWasLoadedForStory …
Run Code Online (Sandbox Code Playgroud)

ios uicollectionview uicollectionviewcell ios10 xcode8

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