//定义两个文本框UITextField*textName;UITextField*textSummary;//点击return按钮去掉-(BOOL)textFieldShouldReturn:(UITextField*)textField{[textFieldresignFirstResponde...
分类:
移动开发 时间:
2014-08-12 13:24:04
阅读次数:
267
只要有程序员朋友们问过两次的问题 就会收录在此FAQ中 1.C#Light对比LUA有什么好处 C#Light是静态类型脚本语言,语法同C#,Lua是动态类型脚本语言,这两种都有人喜欢。 我更喜欢静态类型,于是有了C#Light 2.C#Light性能怎么样 C#Light和Unilua 和ulua...
分类:
其他好文 时间:
2014-08-12 12:37:44
阅读次数:
172
/生成采样对照颜色(黑色)UIColor*sampleColor=[UIColorcolorWithRed:(0/255.0f)green:(0/255.0f) blue:(0/255.0f)alpha:(255/255.0f)];//比较 if(CGColorEqualToColor(detect...
分类:
移动开发 时间:
2014-08-11 23:48:12
阅读次数:
269
ios UIView setFrame not working:很奇怪吧,又不报错,打印frame正常,可就是frame set无效。最简单的方法取interface builder 对该xib取消选择auto layout;
分类:
移动开发 时间:
2014-08-11 21:07:52
阅读次数:
195
//***简单动画 [UIView animateWithDuration:3 animations:^{// _animationView.center = CGPointMake(arc4random()%320, arc4random()%480);//改变中心点// _animat...
分类:
移动开发 时间:
2014-08-07 22:49:55
阅读次数:
281
//判断是否为ios7
取消控件往上移
if ([[UIDevice
currentDevice].systemVersion
doubleValue] >= 7.0) {
self.edgesForExtendedLayout =
UIRectEdgeNone;
}...
分类:
移动开发 时间:
2014-08-07 15:47:20
阅读次数:
197
iOS7上tableView的分割线左边短了一点,要实现和iOS6中的效果还是有方法的,UITableView头文件里个属性:
@property (nonatomic)
UIEdgeInsets separatorInset
NS_AVAILABLE_IOS(7_0)
UI_APPEARANCE_SELECTOR; // allows...
分类:
移动开发 时间:
2014-08-05 15:55:29
阅读次数:
260
设置UITextField的placeholder颜色 UIColor *color = [UIColor blackColor]; textField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"密码"....
分类:
移动开发 时间:
2014-08-05 13:54:59
阅读次数:
216
这方法挺实用的,直接调用就可以得到想要的size。//将一个UIImage缩放变换到指定Size-(UIImage*) OriginImage:(UIImage *)image scaleToSize:(CGSize)size{ UIGraphicsBeginImageContext(size);....
分类:
移动开发 时间:
2014-08-05 13:51:19
阅读次数:
196
题意,一个矩阵,上面可以横放或者竖着放骨牌(1X2)保证横的与横的不重叠,竖的和竖的不重叠,求拿掉最小的牌,使所有的都不重叠。
分析:一看,不重叠就是没有边,拿最少,就是留最多,最大独立集啊!二分图,n+m个-最大流(最大匹配)=ans。
简单题。
#include
#include
#include
#include
using namespace std;
const int inf=0...
分类:
其他好文 时间:
2014-08-01 19:52:32
阅读次数:
267