小编Dir*_*alb的帖子

动态更改UICollectionReuseableView(集合节标题)的高度

我试图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)

objective-c ios6 xcode4.5

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

Response.Redirect投掷错误

我遇到了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)

c# asp.net

4
推荐指数
1
解决办法
9560
查看次数

标签 统计

asp.net ×1

c# ×1

ios6 ×1

objective-c ×1

xcode4.5 ×1