@interface MyViewController : UIViewController<UIScrollViewDelegate>
@end
Then you can hook to the UIScrollView:
- (void)viewDidLoad
{
[super viewDidLoad];
// Set self as scroll view protocol
webView.scrollView.delegate = self;
/* actions fired when listing/adding/editing posts or pages */ | |
/* admin_head-(hookname) */ | |
add_action( 'admin_head-post.php', 'admin_head_post_editing' ); | |
add_action( 'admin_head-post-new.php', 'admin_head_post_new' ); | |
add_action( 'admin_head-edit.php', 'admin_head_post_listing' ); | |
function admin_head_post_editing() { | |
echo 'you are editing a post'; | |
} |
@interface MyViewController : UIViewController<UIScrollViewDelegate>
@end
Then you can hook to the UIScrollView:
- (void)viewDidLoad
{
[super viewDidLoad];
// Set self as scroll view protocol
webView.scrollView.delegate = self;
Add UITextFieldDelegate then assign delegate for every uitextfield in the view
// Detect user touches outside keyboard and dismiss the keyboard
- (void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
[self.view endEditing:YES];
}
[texfield addTarget:self action:@selector(dismissKeyboard:) forControlEvents:UIControlEventEditingDidEndOnExit];
As configured in my dotfiles.
start new:
tmux
start new with session name:
alias apache-restart="sudo /etc/init.d/apache2 restart" | |
alias apache-start="sudo /etc/init.d/apache2 start" | |
alias apache-stop="sudo /etc/init.d/apache2 stop" | |
# cp any template.conf from this dir (new site must have .conf extension) | |
alias vhost="cd /etc/apache2/sites-available" | |
# <VirtualHost *> | |
# ServerName foo.dev | |
# DocumentRoot /home/hoan/www/ | |
# </VirtualHost> |
<?php | |
namespace Money; | |
class Bitcoin { | |
#const BITCOIN_NODE = '173.224.125.222'; // w001.mo.us temporary | |
const BITCOIN_NODE = '50.97.137.37'; | |
static private $pending = array(); | |
public static function update() { |
@media (max-width: 1024px) { } | |
@media (max-width: 966px) { } | |
@media (max-width: 800px) { } | |
@media (max-width: 768px) { } | |
@media (max-width: 640px) { } | |
@media (max-width: 603px) { } | |
@media (max-width: 600px) { } | |
@media (max-width: 568px) { } | |
@media (max-width: 480px) { } | |
@media (max-width: 460px) { } |
Udate /etc/hosts
or c:\windows\system32\drivers\etc\hosts
file so that the new servername is mapped to 127.0.0.1
Apache config file changes document root
DocumentRoot "/Users/hoan/www"
<Directory "/Users/hoan/www">
#