我试图UICollectionView动态设置节标题的高度,但使用下面的代码,我没有看到任何变化.视图是使用正确的项目绘制的,但高度不会让步.很抱歉,如果这是一个重复的问题,但我似乎找不到任何与该UICollectionView对象有关的内容.提前致谢.
- (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView
viewForSupplementaryElementOfKind:(NSString *)kind
atIndexPath:(NSIndexPath *)indexPath
{
PhotoVideoHeaderCell *headerView = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionHeader
withReuseIdentifier:@"videoHeaderView"
forIndexPath:indexPath];
if (indexPath.section == 0) {
// photos
[headerView setSection:@"Photo"];
} else {
[headerView.VehicleDetailView removeFromSuperview];
CGRect frame = headerView.frame;
frame.size.height = 60;
[headerView setFrame:frame];
[headerView setNeedsDisplay];
[headerView setBackgroundColor:[UIColor grayColor]];
[headerView setSection:@"Video"];
}
return headerView;
}
Run Code Online (Sandbox Code Playgroud) 我遇到了response.redirect调用的问题.
错误:
System.Threading.ThreadAbortException:线程正在中止.在System.Threading.Thread.AbortInternal()处于System.Web.HttpResponse.End()的System.Threading.Thread.Abort(Object stateInfo)处System.Web.HttpResponse.Redirect(String url,Boolean endResponse). Web.AdttUser.LoginHandler.OpenIdLogin()中的Web.HttpResponse.Redirect(String url)位于c:\ Builds\15\Digital\main\Sources\Web\Public\LoginHandler.aspx.cs:第113行
重定向发生在一个try - catch声明中,我似乎无法找到正确的方法.
try
{
if (Request.Form.HasKeys())
{
Global.Logger.Info(string.Format("OpenIdLogin_Has_Keys"));
string request = Request.Form.GetValues("token")[0].ToString();
Rpx rpx = new Rpx("123412341234", "https://login.youwebsite.com/");
var xml = rpx.AuthInfo(request).InnerXml;
//lblx.Text = xml.ToString();
XElement xdoc = XElement.Parse(xml);
if (xdoc.Element("email") != null)
xdoc.Element("email").Value = "";
int userId = SaveMember(xdoc);
if (userId > -1)
{
//add the user id to session for later
Session["CurrentUserId"] = userId;
Session["UserLoggedIn"] = true;
}
else
{
Session["UserLoggedIn"] = false;
}
articlePath = …Run Code Online (Sandbox Code Playgroud)