原创 hdu4414 字符串 模擬
#include<iostream> #include<cstdio> #include<cstring> #define M 55 using namespace std; char map [M][M]; int find (in
原创 如何使用xib自定義UITableViewCell
如何使用xib自定義UITableViewCell xib文件的創建和添加控件 創建一個xib文件 xib中拖入一個tableViewCell 在將需要添加的控件拖入到cell中 創建一個繼承於UITableViewC
原创 NSBundle 的常用方法
1.取出文件的路徑 NSString *path = [[NSBundlemainBundle]pathForResource:@"tgs.plist"ofType:nil]; 2.取出Xib 將Xib中所有描述對象按順序放到數
原创 進度條 UIProgressView
@interface LRUIProgressViewViewController () @end @implementation LRUIProgressViewViewController{ UIProgressV
原创 Main.storyboard
1.在新建的Main.storyboard中 如何弄出箭頭 選中 is initial view controller
原创 UIStepper 計步器
UIStepper *stepper = [[UIStepper alloc] initWithFrame:CGRectMake(100, 100, 0, 0)]; self.stepper = stepper;
原创 UISwitch
switch有一個屬性on 是一個bool類型 表示當前開關的狀態 YES爲開NO爲關 UISwitch 只能響應UIControlEventValueChanged事件 定製UISwitch 設置鏤空顏色 這個設置之後可以看
原创 UISlider滑塊
滑塊的基本屬性 滑塊要設置寬高,高度過小,不能進行滑動 minimumValue 最小值 maximumValue最大值 一般設置爲0和1 value滑塊當前的值 minimumValueImage 最小值的圖片 maximu
原创 hdu 1702 暴力
#include <stdio.h> #include <string.h> char flag[5],s[5]; int main () { int n,m,a[1000],t; int count1,count2;
原创 NYOJ 150 棧
#include <stdio.h> #include <string.h> int main () { char a[15],b[15]; int n,i,stack[15]; int flag [30],k,j
原创 UIActionSheet 操作表
操作表的創建 UIActionSheet *sheet = [[UIActionSheet alloc] initWithTitle:@"分享" delegate:nil cancelButtonTitle:@"取消" dest
原创 活動指示器 UIActivityIndicatorView
活動指示器的創建 @interface LRUIActivityIndicatorViewViewController () /**活動指示器*/ @property(nonatomic,weak)UIActivityIndic
原创 poj 1012 約瑟夫
http://poj.org/problem?id=1012 #include <stdio.h> #include <string.h> int main () { int a[30],i,j,n,b[15],min,m;
原创 在UIButton中如何將imageView和titleView居中且上下分佈
//創建一個button UIButton *btn = [[UIButtonalloc]init]; [self.viewaddSubview:btn]; btn.frame =CGRectMak
原创 automaticallyAdjustsScrollViewInsets
iOS 7 viewcontroller新增屬性automaticallyAdjustsScrollViewInsets,即是否根據按所在界面的navigationbar與tabbar的高度,自動調整scrollview的 ins