Skip to content

Instantly share code, notes, and snippets.

@ainame
Created July 3, 2013 14:41
Show Gist options
  • Save ainame/5918580 to your computer and use it in GitHub Desktop.
Save ainame/5918580 to your computer and use it in GitHub Desktop.
# -*- coding: utf-8 -*-
class AppDelegate
def application(application, didFinishLaunchingWithOptions:launchOptions)
@window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds)
@window.rootViewController = UINavigationController.alloc.initWithRootViewController(TestController.alloc.init)
@window.makeKeyAndVisible
end
end
class TestController < UITableViewController
def viewDidLoad
super
self.view.frame = CGRectMake(0,0, 20, 10)
end
def viewWillAppear(animated)
super
self.view.frame = CGRectMake(0,0, 20, 10)
end
## ここなら反映された
def viewDidAppear(animated)
super
self.view.frame = CGRectMake(0,0, 20, 10)
end
def tableView(tableView, numberOfRowsInSection:section)
return 1;
end
def tableView(tableView, cellForRowAtIndexPath:indexPath)
cell = UITableViewCell.alloc.initWithStyle(UITableViewCellStyleDefault, reuseIdentifier:'cell');
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment