I want to create a tableviewcell and add it on the view(not tableview) as
CGRect aframe=CGRectMake( 20, 20, 200, 200);
UITableViewCell *cell =[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil];
cell.frame=aframe;
[self.view addSubview:cell];
But this is not working at all.
Can’t we create cell independently and add to our view
UITableViewCellis meant to be used in aUITableView. I would imagine that there are things happening under the hood inUITableViewCellthat assume that it’s operating in aUITableView. Even if you were able to get this to work, I would expect it to be pretty fragile and vulnerable to breaking during OS updates, again, because it was written with the assumption of being embedded in aUITableView.