小编Adn*_*han的帖子

无法从init系列中的方法中分配给self?

我使用自己像" self = [super init];",以下代码给我一个错误" cannot assign to self out of a method in the init family"

- (id)showDropDown:(UIButton *)b:(CGFloat *)height:(NSArray *)arr:(NSString *)direction {
    btnSender = b;
    animationDirection = direction;
    self = [super init];
    if (self) {
        // Initialization code
        CGRect btn = b.frame;
        self.list = [NSArray arrayWithArray:arr];

        if ([direction isEqualToString:@"up"]) {
            self.frame = CGRectMake(btn.origin.x, btn.origin.y, btn.size.width, 0);
            self.layer.shadowOffset = CGSizeMake(-5, -5);
        }else if ([direction isEqualToString:@"down"]) {
            self.frame = CGRectMake(btn.origin.x, btn.origin.y+btn.size.height, btn.size.width, 0);
            self.layer.shadowOffset = CGSizeMake(-5, 5);
        } …
Run Code Online (Sandbox Code Playgroud)

objective-c ios

23
推荐指数
2
解决办法
2万
查看次数

在rails上的ruby上读取目录中的文件

我是ruby on rails的新手,我想从指定的目录中读取文件名.任何人都可以建议代码或任何其他链接?

谢谢

filenames ruby-on-rails

20
推荐指数
5
解决办法
2万
查看次数

如何在xcode中创建DropDown?

我是IOS的新开发者,我需要帮助,如何在xcode中创建下拉框,任何一个提供我在下拉列表中创建国家/地区列表的示例?

iphone xcode

9
推荐指数
1
解决办法
8万
查看次数

' - [UITableViewController loadView]加载了"MySubscriptionsViewController"笔尖,但没有得到UITableView.

我更新了我的xcode使用6.1模拟器,我的应用程序工作正常的5.1模拟器,

现在我收到以下错误:

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UITableViewController loadView] loaded the "MySubscriptionsViewController" nib but didn't get a UITableView.' 
Run Code Online (Sandbox Code Playgroud)

我的头文件:

#import <UIKit/UIKit.h>

@interface MySubscriptionsViewController : UITableViewController{

}

@property (nonatomic,retain) NSString *serverAddress;
@property (nonatomic, retain) UITextField *airportField;
@property (nonatomic, retain) NSMutableArray *airportList;

@property (nonatomic, retain) NSMutableArray *colCode;
@property (nonatomic, retain) NSMutableArray *colAirport;
@property (nonatomic, retain) NSMutableArray *colStartDate;
@property (nonatomic, retain) NSMutableArray *colStartTime;
@property (nonatomic, retain) NSMutableArray *colEndTime;
@property (nonatomic, retain) NSMutableDictionary *tempAirport;


@property (nonatomic,strong) NSDictionary *countryList;
@property …
Run Code Online (Sandbox Code Playgroud)

iphone xcode

2
推荐指数
1
解决办法
5234
查看次数

在c#中重用连接文件

我希望将打开的连接文件分开并重新使用在.cs文件中的不同位置.我不想重写以下代码:

using (SqlConnection cn = new SqlConnection(ConfigurationManager.ConnectionStrings["connection"].ToString()));
Run Code Online (Sandbox Code Playgroud)

是否有可能在c#中,如php include files include("opendb.php").

c# asp.net

-2
推荐指数
1
解决办法
139
查看次数

标签 统计

iphone ×2

xcode ×2

asp.net ×1

c# ×1

filenames ×1

ios ×1

objective-c ×1

ruby-on-rails ×1