有谁知道CNN如何做他们的顶级下拉菜单?
它看起来像是通过触摸拖动事件调用的UITableView但不确定.用Google搜索各种关键字但无法改变任何关键字.只是寻找有关如何复制此行为的一些指导.

我正在使用Apple的示例代码来显示来自http://bit.ly/x4nhG5的Twitter提要
从示例中,代码将获取JSON并将其放入NSDictionary中:
NSDictionary *publicTimeline = [NSJSONSerialization JSONObjectWithData:responseData options:0 error:&jsonParsingError];
Run Code Online (Sandbox Code Playgroud)
我此刻想做的就是查看通过执行此操作返回的所有键:
NSArray *allKeysArray = [publicTimeline allKeys];
Run Code Online (Sandbox Code Playgroud)
然后我在尝试运行程序时收到错误:
由于未捕获的异常'NSInvalidArgumentException'终止应用程序,原因:' - [__ NSCFArray allKeys]:无法识别的选择器发送到实例0x6a950f0'
为什么从JSON加载的这个NSDictionary的行为是这样的?
谢谢,跳蚤
据NHibernate的探查,我需要逆="真"添加到我的映射文件,但是,我似乎无法找到确切位置在哪里把这个属性的例子.任何人都可以根据以下映射文件告诉我,我需要将inverse ="true"?
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
auto-import="true"
namespace="LROLib.Domain"
assembly="LROLib">
<class name="TestResult" table ="Test_Results" >
<id name="Test_Result_Id" >
<generator class="native" />
</id>
<many-to-one name="Test_Result" class="Result" column="Result_Id" />
<many-to-one name="Test_Applicant" class="Applicant" column="Applicant_Id"/>
<property name="Test_Name" />
<property name="Value" />
<property name="Hi_Lo_Ind" />
<property name="Range" />
<property name="Unit_Of_Measure" />
<property name="Lo_Range" />
<property name="Hi_Range" />
<property name="Create_DateTime" update="false"/>
<property name="Update_DateTime" />
<property name="User_Name" />
</class>
</hibernate-mapping>
Run Code Online (Sandbox Code Playgroud) 在我的手机中,UITableViewCell我有一个UIButton代表手机,当用户触摸时,可以调用表格单元格中特定对象指定的电话号码.

由于我将有多个按钮,并且每个按钮都有一个特定的电话号码,我试图将tag属性设置UIButton为当前indexPath.row,但是它适用于前6个单元格但是当单元格开始被重用时,标签才会回到0对于所有按钮.我在重用块之外设置按钮的标签,我认为这应该是正确的方法来识别每个独特的单元格.
为了测试,我还将cell.tag属性设置为indexPath.row并且它完美地工作,因此它肯定与UIButton隔离.关于我可能做错的任何想法?
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *SchoolCellIdentifer = @"SchoolCellIdentifier";
SchoolInfoItem *item = [self.schoolArray objectAtIndex:indexPath.row];
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:SchoolCellIdentifer];
// If the cell doesn't existing go ahead and make it fresh.
if (cell == nil)
{
// Begin Phone button view
UIButton *phoneButton = [[UIButton alloc] initWithFrame:CGRectMake(67, 70, 35, 35)];
phoneButton.tag = 80;
UIImageView *phoneView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"phone-icon.png"]]; …Run Code Online (Sandbox Code Playgroud)