This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// FirstViewController.m | |
// NotifDemo | |
// | |
// Created by wisaruthk on 3/3/2559 BE. | |
// Copyright © 2559 kojo. All rights reserved. | |
// | |
#import "FirstViewController.h" | |
#import "Children.h" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section | |
{ | |
if(tableView==self.tableView1){ | |
CGRect frame = tableView.frame; | |
//NSLog(@"self view %@",NSStringFromCGRect(self.view.frame)); | |
//NSLog(@"tableview frame %@",NSStringFromCGRect(frame)); | |
UITableViewHeaderFooterView *headerView = [[UITableViewHeaderFooterView alloc] initWithFrame:CGRectMake(0, 0, frame.size.width, 20)]; | |
CGFloat btnWidth = 50; | |
CGFloat btnTrail = 10; | |
UIButton *sortButton = [[UIButton alloc] initWithFrame:CGRectMake(frame.size.width-(btnWidth+btnTrail), 0, btnWidth, 20)]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
######################### | |
# .gitignore file for Xcode4 and Xcode5 Source projects | |
# | |
# Apple bugs, waiting for Apple to fix/respond: | |
# | |
# 15564624 - what does the xccheckout file in Xcode5 do? Where's the documentation? | |
# | |
# Version 2.6 | |
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UIBlurEffect *effect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleDark]; | |
UIVisualEffectView *bluredView = [[UIVisualEffectView alloc] initWithEffect:effect]; | |
bluredView.frame = self.view.bounds; | |
[self.view insertSubview:bluredView atIndex:0]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[button setTranslatesAutoresizingMaskIntoConstraints: NO]; | |
id topGuide = myViewController.topLayoutGuide; | |
NSDictionary *viewsDictionary = NSDictionaryOfVariableBindings (button, topGuide); | |
[myViewController.view addConstraints: | |
[NSLayoutConstraint constraintsWithVisualFormat: @"V:[topGuide]-20-[button]" | |
options: 0 | |
metrics: nil | |
views: viewsDictionary] | |
]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func animateView3(view:UIView){ | |
let animation:CABasicAnimation = CABasicAnimation(keyPath: "backgroundColor") | |
animation.fromValue = FlatWhite().CGColor | |
animation.toValue = FlatYellowDark().CGColor | |
animation.duration = 0.5 | |
//animation.autoreverses = true | |
view.layer.addAnimation(animation, forKey: "backgroundColor") | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let url:NSURL = NSBundle.mainBundle().URLForResource("howto", withExtension: "html", subdirectory: "local_html")! | |
self.webViewDialog.loadRequest(NSURLRequest(URL: url)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
order_line_id = self.models.execute_kw(self.db, self.uid, self.password, 'purchase.order.line', 'create', | |
[{'order_id': opo_id, | |
'partner_id':partner_id, | |
'name': product['name'], | |
'product': product, | |
'product_qty': xpo_line['ordqty'], | |
'price_unit': xpo_line['unitpr'], | |
'date_planned':rcvdat, | |
'taxes_id':[(6,False,[tax_id])], | |
}]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
'attribute'=>'lot_id', | |
'value'=>'lot.name', | |
'label'=>'Control No.', | |
'filterType'=> GridView::FILTER_SELECT2, | |
'filterWidgetOptions'=>[ | |
'initValueText'=>'hello', | |
'options' => ['placeholder' => 'Search for a city ...'], | |
'pluginOptions' => [ | |
'allowClear' => true, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
'attribute'=>'in_date', | |
'format'=>['date', 'dd/MM/yyyy'], //format นี้จะใช้ในการแสดง | |
'filterType'=>GridView::FILTER_DATE, | |
'filterWidgetOptions'=>[ | |
'type' => DatePicker::TYPE_COMPONENT_APPEND, | |
'pluginOptions' => [ | |
'autoclose'=>true, | |
'format' => 'yyyy-mm-dd' //format นี้จะใช้ใน Query statement | |
] |