上一页 1 ··· 29 30 31 32 33 34 35 36 37 ··· 39 下一页

2013年8月27日

ios 去除UITextField中的空格

摘要: NSString *qName =[userNameText.text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; 阅读全文

posted @ 2013-08-27 14:47 Hai_阔天空 阅读(799) 评论(0) 推荐(0)

ios UITableView默认选中第一行

摘要: NSIndexPath *ip = [NSIndexPath indexPathForRow:0inSection:0];[titleTableViewselectRowAtIndexPath:ip animated:YESscrollPosition:UITableViewScrollPositionTop]; 阅读全文

posted @ 2013-08-27 13:37 Hai_阔天空 阅读(548) 评论(0) 推荐(0)

ios 监听设备旋转方向

摘要: -(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation{ if(fromInterfaceOrientation == UIInterfaceOrientationLandscapeLeft || fromInterfaceOrientation == UIInterfaceOrientationLandscapeRight) { } if (self.interfaceOrientation == UIDeviceOrientation... 阅读全文

posted @ 2013-08-27 13:34 Hai_阔天空 阅读(1076) 评论(0) 推荐(0)

ios 添加朦层

摘要: @interface RootViewController : UIViewController{ UIView *view;}-(void)createBackgroundView{ view = [[UIView alloc]initWithFrame:self.view.frame]; view.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.0]; view.opaque = NO;UIWindow *appWindow = [[UIApplicationsha... 阅读全文

posted @ 2013-08-27 13:01 Hai_阔天空 阅读(346) 评论(0) 推荐(0)

ios 异步加载图片

摘要: #import "AsyncImageView.h"@implementation AsyncImageView - (id)initWithFrame:(CGRect)frame{ self = [super initWithFrame:frame]; if (self) { // Initialization code } return self;} - (void)loadImageFromURL:(NSURL*)url { if (connection!=nil) { [connection release]; } if (data!... 阅读全文

posted @ 2013-08-27 11:49 Hai_阔天空 阅读(238) 评论(0) 推荐(0)

ios 屏幕旋转的问题

摘要: 在ios6之前我们旋转屏幕只需要实现shouldAutorotateToInterfaceOrientation就行了- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation{ return YES;}但是ios6上这个就失效了,需要实现shouldAutorotate 和 supportedInterfaceOrientations具体步骤是1. Delegate里面要分开判断ios版本,setRootViewController方法是不同的:1 if ( [[... 阅读全文

posted @ 2013-08-27 10:53 Hai_阔天空 阅读(290) 评论(0) 推荐(0)

2013年8月21日

c# Socket通信基础

摘要: 一、IP地址操作类1、IPAddress类a、在该类中有一个Parse()方法,可以把点分的十进制IP表示转化成IPAddress类,方法如下: IPAddressaddress=IPAddress.Parse(“192.168.0.1”);b、IPAddress提供4个只读字段Any用于代表本地系统可用的任何IP地址Broadcase用于代表本地网络的IP广播地址Loopback用于代表系统的回送地址 None用于代表系统上没有网络接口其中IPAddress.Any最常用可以用来表示本机上所有的IP地址,这对于socket服务进行侦听时,最方便使用,不用对每个IP进行侦听了。而IPAddre 阅读全文

posted @ 2013-08-21 13:04 Hai_阔天空 阅读(286) 评论(0) 推荐(0)

ios 更改全局UINavigationBar的背景图片以及通知栏颜色

摘要: 1.更改UINavigationController push 到另一个界面返回按钮的titleself.navigationController.navigationBar.topItem.backBarButtonItem = [[UIBarButtonItem alloc]initWithTi... 阅读全文

posted @ 2013-08-21 10:50 Hai_阔天空 阅读(1265) 评论(0) 推荐(0)

2013年8月20日

ios 手势识别

摘要: 1 // 2 // ViewController.m 3 // testGestures 4 // 5 // Created by shawn li on 13-7-29. 6 // Copyright (c) 2013年 bigbellshawn. All rights reserved. 7 // 8 9 #import "ViewController.h" 10 11 @interface ViewController () 12 @property (nonatomic, strong) UIImageView *imageView; 13 @end 1... 阅读全文

posted @ 2013-08-20 17:51 Hai_阔天空 阅读(463) 评论(0) 推荐(0)

c# Sockect 通信

摘要: 1.Serverusing System;using System.Collections.Generic;using System.Text;//添加Socket类using System.Net;using System.Net.Sockets;namespace ScoketServer{ class Program { static void Main(string[] args) { int port = 8080; string host = "17.1.1.78"; //创建... 阅读全文

posted @ 2013-08-20 15:34 Hai_阔天空 阅读(360) 评论(0) 推荐(1)

上一页 1 ··· 29 30 31 32 33 34 35 36 37 ··· 39 下一页

导航