小编Kni*_*tsu的帖子

UICollection View - Segue - 选择了特定的单元格,LOG

我开始使用UICOllectionview加载定制的相册,相册负载蛮好的,数据是从我的服务器(SQL-JSON-的NSArray,NSDictionary中)来了,在小区的就好被填充,但是现在我当用户选择该单元格来加载具有全尺寸图像的新UIVIewController时(因此他们可以查看/打印/共享等)

然而,我陷入'准备segue'方法,因为我无法从该特定单元格中提取任何信息

作为一个测试,我现在只想要一个NSLOG说"用户选择标题@ @%@"

这是我的代码到目前为止,任何帮助将非常感谢...

#import "AlbumViewController.h"
#import "AlbumCustomCell.h"
#import "PhotosInAlbumsViewController.h"

@interface AlbumViewController ()

@end

@implementation AlbumViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    /// Grab Photo Album information (pics,title,date) From Server



    NSString *myURL1 = [ NSString stringWithFormat:         @"http://mywebsiteaddress.com/index.php"];
    NSData *data = [NSData dataWithContentsOfURL: [NSURL URLWithString:myURL1]];
    NSError *error;
    NSDictionary *json = [NSJSONSerialization …
Run Code Online (Sandbox Code Playgroud)

nsdictionary ios segue uistoryboardsegue uicollectionview

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