自前のUITableViewCellを作ろうとしてハマった記録。 そもそも何がしたかったか AVPlayerLayerをのせたcustom UITableViewCellを作りたかった。UITableViewCell一つ一つにAVPlayerのUIViewが表示されている感じ。既存アプリだとVineのイメージが近い。以下の画像のように動画をUITableViewCellに直接貼りたかった。 何がまずかったか UITableViewCellのxibを作りレイアウトを構成して、初期化の中でAVPlayerLayerを生成した。 - (id)initWithIndexPath:(NSIndexPath*)indexPath{ self = [super init]; if( self ) { NSURL *movieURL = @"動画ファイルの場所" AVPlayer *player = [[