在ios 7中的UITableView部分周围绘制边界线(draw borderline around UITableView section in ios 7)

我有关于区域边界的问题。 我有一个UITableView ,它的类型为Grouped。 我试图在tableview的每个部分周围绘制边框。 我使用下面的代码获取部分框架。 请告诉我如何在UITableView部分周围绘制边框。

CGRect rect = [groupsTableView rectForSection:indexPath.section];

NSLog(@"%f %f %f %f",rect.origin.x,rect.origin.y,rect.size.width,rect.size.height);

在此处输入图像描述


I have an issue regarding the section border. I have a UITableView and it is of type Grouped. I am trying to draw the border around the each section of the tableview. I am getting the section frame using the below code. Could please tell me how to draw the border around the UITableView section.

CGRect rect = [groupsTableView rectForSection:indexPath.section];

NSLog(@"%f %f %f %f",rect.origin.x,rect.origin.y,rect.size.width,rect.size.height);

enter image description here


原文:https://stackoverflow.com/questions/22910881
2024-05-06 22:05

满意答案

var count = 10;
//Add the 2 days of weekend in numer of days .
var d = new Date();

count = count + (parseInt(count/5))*2;
d.setDate(d.getDate() -count);
//suppose its ending on weekend day then increment them manually.
if(d.getDay() == 6 ) d.setDate(d.getDate() -1); 
if(d.getDay() == 0){ d.setDate(d.getDate() - 2);}; 
alert(d);

它将从你想要动态减去日的任何周末减去所有周末


var count = 10;
//Add the 2 days of weekend in numer of days .
var d = new Date();

count = count + (parseInt(count/5))*2;
d.setDate(d.getDate() -count);
//suppose its ending on weekend day then increment them manually.
if(d.getDay() == 6 ) d.setDate(d.getDate() -1); 
if(d.getDay() == 0){ d.setDate(d.getDate() - 2);}; 
alert(d);

it will substract all weekend day from whatever you want to substract day dynamically

相关问答

更多

加号(Add no. of days in a date to get next date(excluding weekends))

尝试这个 var startDate = "9-DEC-2011"; startDate = new Date(startDate.replace(/-/g, "/")); var endDate = "", noOfDaysToAdd = 13, count = 0; while(count < noOfDaysToAdd){ endDate = new Date(startDate.setDate(startDate.getDate() + 1)); if(endDate.ge...

在Shopify中添加不包括周末的日期(Adding days to a date excluding weekends in Shopify)

在Liquid中使用date过滤器。 您在Ruby中使用的日期格式相当于: {{ "now" | date: "%Y, %m, %-d" }} 一天是86400秒。 从现在开始添加3天并格式化的示例: {% assign days = 3 | times: 86400 %} {{ "now" | date: "%s" | plus: days | date: "%Y, %m, %-d" }} 注意:您需要date: "%s"过滤器首先应用于“now”,以便Liquid了解您使用的是当前时间戳而...

如何使用datepicker格式化dd / mm / yy中的From / To date(How to format From/To date in dd/mm/yy using datepicker)

尝试这个: $("#FromDate").datepicker({ numberOfMonths: 2, dateFormat : 'dd/mm/yy', onSelect: function() { var minDate = $('#FromDate').datepicker('getDate'); $("#ToDate").datepicker("change", { minDate: minDate }); } }); $(...

将“mmm-yy”转换为“dd / mm / yyy”(converting “mmm-yy” to “dd/mm/yyy”)

Function ChangeDate(strInput As String) As Date Dim iYear, iMonth iYear = CInt(Split(strInput, "-")(1)) iMonth = Month("01/" & Format(Split(strInput, "-")(0), "mmmm")) ChangeDate= DateSerial(iYear, iMonth, 1) End Function Function ChangeDate...

选择日期后的天数不包括周末和节假日(Add days after date is selected excluding weekends and holidays)

解决了! 这里的答案非常有帮助。 码: function AddBusinessDays(weekDaysToAdd) { var curdate = new Date(); var realDaysToAdd = 0; while (weekDaysToAdd > 0){ curdate.setDate(curdate.getDate()+1); realDaysToAdd++; //check if curre...

in_array检查它是否包含以mm / dd / yyy格式显示的日期(in_array to check if it contains a date in mm/dd/yyy format)

使用preg_replace_callback而不是in_array 。 将数组传递给它并匹配日期格式模式。 如果模式匹配,请将其替换为回调。 示例( 演示 ): $v = array( 'joomla'=>'some value again', 'date_applied' => '23/04/2012', ); $result = preg_replace_callback('#^\d{1,2}/\d{1,2}/\d{4}$#', function($match) { ...

日期正则表达式/ MM / yyy或yyyy(Date regex dd/MM/yyy or yyyy)

你不能用这个: ((0[0-9]|1[0-2])\/([0-2][0-9]|3[0-1])\/)?\d{4} Can't you use this: ((0[0-9]|1[0-2])\/([0-2][0-9]|3[0-1])\/)?\d{4}

从日期字段中减去天数(mm / dd / yyy),不包括周末jquery(Subtract days from a date field(mm/dd/yyy) excluding weekends jquery)

var count = 10; //Add the 2 days of weekend in numer of days . var d = new Date(); count = count + (parseInt(count/5))*2; d.setDate(d.getDate() -count); //suppose its ending on weekend day then increment them manually. if(d.getDay() == 6 ) d.setDate(...

如何计算Emacs日历中不包括周末和假日的天数(How to count days excluding weekends and holidays in Emacs calendar)

我认为这基本上分为三个部分: 计算一个地区的日子 减去周末的日子 减去假期 Emacs的第一部分已经覆盖了M-= ( calendar-count-days-region ),所以让我们来看看这个函数 。 很有帮助,但遗憾的是它会读取缓冲区并直接发送输出。 让我们创建一个通用版本,它接受开始和结束日期参数并返回天数而不是打印它们: (defun my-calendar-count-days(d1 d2) (let* ((days (- (calendar-absolute-from-grego...

PLSQL - 以dd / mm / yyy +1格式添加日期(PLSQL - Add days to date in format dd/mm/yyy +1)

DATE数据类型不存储为字符串,因此不建议对特定格式进行硬编码,因为格式可能会根据您的数据库/会话NLS_DATE_FORMAT值而更改。 更可移植的表达式是在查询中包含数据格式掩码,例如: select * from table Foo where date_col = to_date('06/FEB/2011','DD/MON/YYYY) + 7; 此处记录了日期格式掩码值。 在pl / sql块中执行查询时,必须在返回时为结果集定义某处。 您需要使用光标。 在您的示例中,如果您只返回一行...

相关文章

更多

尚学堂ios中级视频教程

UI课程简介 本iOS_UI视频教程由刘雨佳欢主讲,在iOS实际开发中,大约70%的时间都是在搭 ...

IOS高访微信聊天对话界面(sizeWithFont:constrainedToSize和stretchableImageWithLeftCapWidth的使用)

大家好,百忙之中,抽出点空,写个微博,话说好久没写。 最近项目中有碰到写类似微信聊天界面上的效果,特整 ...

iOS设备的越狱方法

最近公司的事情很忙,在开发一个类似于微信的App,经常加班,所以也没有时间去更新微信公众账号的内容了。 ...

iOS设备的越狱方法

本文转载至http://www.cnblogs.com/easonoutlook/p/3280232. ...

《国内首部基于iOS平台下iphone、ipad应用开发-iOS5剖析(新增IOS5项目实战:秦朝史话小说项目)》更新项目第9课[压缩包]

中文名: 国内首部基于iOS平台下iphone、ipad应用开发-iOS5剖析(新增IOS5项目实战: ...

iOS6和iOS7代码的适配(5)——popOver

popOver这个空间本身是iPad only的,所以iPhone上见不到,我记得微信上有个这样的弹出 ...

UITableView 顶部能够放大的图片

UITableView 顶部能够放大的图片 现在有挺多的应用在 UITableView 顶部加入图片 ...

微信在IOS7下无法分享图片

家里老大的iphone5在WWDC后第一时间升级了IOS7. 整体的UI风格和功能都很喜欢, 偶尔的c ...

《iOS 5核心框架》扫描版[PDF]

中文名: iOS 5核心框架 作者: (美)Shawn Welch 译者: 鲁成东 ...

IOS端的摇一摇功能

//微信的摇一摇是怎么实现的~发现原来 ios本身就支持//在 UIResponder中存在这么一套方 ...

最新问答

更多

获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)

我用Google搜索了一个解决方案。 “EnumDisplayModeProvider”是我自己设置网站的各种模式的枚举。 public EnumDisplayModeProvider GetDisplayModeId() { foreach (var mode in DisplayModeProvider.Instance.Modes) if (mode.CanHandleContext(HttpContext)) {

如何通过引用返回对象?(How is returning an object by reference possible?)

这相对简单:在类的构造函数中,您可以分配内存,例如使用new 。 如果你制作一个对象的副本,你不是每次都分配新的内存,而是只复制指向原始内存块的指针,同时递增一个也存储在内存中的引用计数器,使得每个副本都是对象可以访问它。 如果引用计数降至零,则销毁对象将减少引用计数并仅释放分配的内存。 您只需要一个自定义复制构造函数和赋值运算符。 这基本上是共享指针的工作方式。 This is relatively easy: In the class' constructor, you allocate m

矩阵如何存储在内存中?(How are matrices stored in memory?)

正如它在“熵编码”中所说的那样,使用Z字形图案,与RLE一起使用,在许多情况下,RLE已经减小了尺寸。 但是,据我所知,DCT本身并没有给出稀疏矩阵。 但它通常会增强矩阵的熵。 这是compressen变得有损的点:输入矩阵用DCT传输,然后量化量化然后使用霍夫曼编码。 As it says in "Entropy coding" a zig-zag pattern is used, together with RLE which will already reduce size for man

每个请求的Java新会话?(Java New Session For Each Request?)

你是如何进行重定向的? 您是否事先调用了HttpServletResponse.encodeRedirectURL()? 在这里阅读javadoc 您可以使用它像response.sendRedirect(response.encodeRedirectURL(path)); The issue was with the path in the JSESSIONID cookie. I still can't figure out why it was being set to the tomca

css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)

我认为word-break ,如果你想在一个单词中打破行,你可以指定它,这样做可以解决问题: .column { word-break:break-all; } jsFiddle演示。 您可以在此处阅读有关word-break属性的更多信息。 I think word-break, with which you can specify if you want to break line within a word, will do the trick: .column { word-break

无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)

我认为您忘记在分类时间内缩放输入图像,如train_test.prototxt文件的第11行所示。 您可能应该在C ++代码中的某个位置乘以该因子,或者使用Caffe图层来缩放输入(请查看ELTWISE或POWER图层)。 编辑: 在评论中进行了一次对话之后,结果发现在classification.cpp文件中错误地删除了图像均值,而在原始训练/测试管道中没有减去图像均值。 I think you have forgotten to scale the input image during cl

xcode语法颜色编码解释?(xcode syntax color coding explained?)

转到: Xcode => Preferences => Fonts & Colors 您将看到每个语法高亮颜色旁边都有一个简短的解释。 Go to: Xcode => Preferences => Fonts & Colors You'll see that each syntax highlighting colour has a brief explanation next to it.

在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)

你考虑过第三方拼写检查吗? 您可以将在C#中开发的自定义WinForms控件插入访问数据库吗? VB6控件怎么样? 如果你能找到一个使用第三方库进行拼写检查的控件,那可能会有效。 Have you considered a third party spell checker? Can you insert a custom WinForms controls developed in C# into an access database? What about a VB6 control? If

从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)

我有同样的问题,因为我在远程服务器上有两个图像,我需要在每天的预定义时间复制到我的本地服务器,这是我能够提出的代码... try { if(@copy('url/to/source/image.ext', 'local/absolute/path/on/server/' . date("d-m-Y") . ".gif")) { } else { $errors = error_get_last(); throw new Exception($err

从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))

我不确定我完全明白你在说什么。 你能编辑你的帖子并包含你正在做的Subversion命令/操作的特定顺序吗? 最好使用命令行svn客户端,以便容易为其他人重现问题。 如果您只是想获取文件的旧副本(即使该文件不再存在),您可以使用如下命令: svn copy ${repo}/trunk/moduleA/file1@${rev} ${repo}/trunk/moduleB/file1 其中${repo}是您的存储库的URL, ${rev}是您想要的文件的版本。 这将恢复该文件的旧版本,包括最高版本