当前位置: 首页 > news >正文

网站设计的主要风格/微信引流的十个方法

网站设计的主要风格,微信引流的十个方法,请人制作软件的网站,企业网站备案资料样本摘要 本章主要使用presentViewController和dismissViewControllerAnimated实现自定义多视图的切换,例子里面模拟导航视图控制器模式,不过跳转的时候有点区别。 运行结果 过程概要 1.新建工程后新增一个基于UIViewController的类,用作多视图…

摘要

       本章主要使用presentViewController和dismissViewControllerAnimated实现自定义多视图的切换,例子里面模拟导航视图控制器模式,不过跳转的时候有点区别。

运行结果




过程概要

1.新建工程后新增一个基于UIViewController的类,用作多视图的第二视图;

2.在主视图里面创建一个UINavigationBar,一个导航栏,控制页面跳转

3.为了增加可视效果,添加了背景图片以及部分文字


主要代码

h文件

//
//  ViewController.h
//  MyNav
//
//  Created by arbboter on 14/12/9.
//  Copyright (c) 2014年 arbboter. All rights reserved.
//#import <UIKit/UIKit.h>
#import "SecondView.h"@interface ViewController : UIViewController
{UINavigationBar* _navigationBar;UINavigationItem* _navigationItemTitle;UIBarButtonItem* _barButtonLeft;UIBarButtonItem* _barButtonRight;SecondView* _nextView;
}@property (nonatomic, retain) UINavigationBar* _navigationBar;
@property (nonatomic, retain) UINavigationItem* _navigationItemTitle;
@property (nonatomic, retain) UIBarButtonItem* _barButtonLeft;
@property (nonatomic, retain) UIBarButtonItem* _barButtonRight;
@property (nonatomic, retain) SecondView* _nextView;
@end


m文件

//
//  ViewController.m
//  MyNav
//
//  Created by arbboter on 14/12/9.
//  Copyright (c) 2014年 arbboter. All rights reserved.
//#import "ViewController.h"@interface ViewController ()@end@implementation ViewController@synthesize _navigationBar;
@synthesize _barButtonLeft;
@synthesize _barButtonRight;
@synthesize _navigationItemTitle;
@synthesize _nextView;- (void)viewDidLoad
{[super viewDidLoad];// Do any additional setup after loading the view, typically from a nib.// 设置图片self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"tree_sky.jpg"]];CGFloat x = self.view.frame.origin.x;CGFloat y = self.view.frame.origin.y + 20;CGFloat w = self.view.frame.size.width;CGFloat h = 40;NSLog(@"%.2f %.2f", self.view.frame.size.width, self.view.frame.size.height);// 设置导航栏self._navigationBar = [[UINavigationBar alloc]initWithFrame:CGRectMake(x, y, w, h)];self._navigationBar.translucent = NO;self._navigationBar.backgroundColor = [UIColor clearColor];[self.view addSubview:_navigationBar];// 导航栏条【左Item,Title,右Item】,分为三部分self._navigationItemTitle = [[UINavigationItem alloc] initWithTitle:@"平凡之路"];[self._navigationBar pushNavigationItem:self._navigationItemTitle animated:YES];self._barButtonRight = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"next.png"] style:UIBarButtonItemStylePlain target:self action:@selector(onNext:)];[self._navigationItemTitle setRightBarButtonItem:self._barButtonRight animated:YES];self._nextView = [[SecondView alloc] init];// 一些界面显示的信息UITextView* textInfo = [[UITextView alloc] initWithFrame:CGRectMake(x, y+h, w, self.view.frame.size.height-h)];textInfo.backgroundColor = [UIColor clearColor];textInfo.editable = NO;textInfo.textColor = [UIColor redColor];NSArray* fontList = [UIFont familyNames];textInfo.font = [UIFont fontWithName:[fontList objectAtIndex:arc4random()%fontList.count] size:18];textInfo.text = @"            平凡之路 - 朴树\n\n""徘徊着的 在路上的\n""你要走吗\n""易碎的 骄傲着\n""那也曾是我的模样\n""\n""沸腾着的 不安着的\n""你要去哪\n""谜一样的 沉默着的\n""故事你真的在听吗\n""\n""我曾经跨过山和大海 也穿过人山人海\n""我曾经拥有着一切 转眼都飘散如烟\n""我曾经失落失望失掉所有方向\n""直到看见平凡才是唯一的答案\n""\n""当你仍然 还在幻想\n""你的明天\n""她会好吗 还是更烂\n""对我而言是另一天\n""\n""我曾经毁了我的一切 只想永远地离开\n""我曾经堕入无边黑暗 想挣扎无法自拔\n""我曾经象你象他象那野草野花\n""绝望着 渴望着 哭着笑着平凡着\n";[self.view addSubview:textInfo];[textInfo release];
}-(IBAction)onNext:(id)sender
{// 跳转到下一个视图[self presentViewController:_nextView animated:YES completion:nil];
}- (void)didReceiveMemoryWarning {[super didReceiveMemoryWarning];// Dispose of any resources that can be recreated.
}- (void)dealloc
{[_navigationBar release];[_navigationItemTitle release];[_barButtonLeft release];[_barButtonRight release];[_nextView release];[super dealloc];
}@end


工程代码

http://www.jmfq.cn/news/5250727.html

相关文章:

  • 上海手机网站建设/免费seo培训
  • 用xampp搭建wordpress/抖音seo优化排名
  • 做网站一台电脑可以吗/网站链接推广工具
  • linux做网站优势/百度快照提交入口
  • 东莞做网站公司在哪/营销型网站建设优化建站
  • 作词做曲网站/谷歌浏览器官网下载
  • 玉环网站制作/域名注册网站有哪些
  • 如何建个人摄影网站/产品推广策划书
  • 邢台网站优化/百度网站优化培训
  • 国际新闻最新消息今天中国/windows10优化大师
  • 电商型网站是否是趋势/哪有培训seo
  • wordpress添加后台菜单/天津网络优化推广公司
  • 淘客网站怎么做代理/一键生成个人网站
  • c2c有哪些网站/国外seo比较好的博客网站
  • 辽宁响应式网站建设哪家好/品牌推广软文案例
  • 开一个做网站的公司赚钱吗/网址域名注册信息查询
  • 购物网页设计模板html/seo查询官方网站
  • 如何设计个人网站/站内seo是什么意思
  • 南昌做网站seo/上海网络seo公司
  • 免费公益虚拟主机/网络优化是做什么的
  • flash做网站的流程/上海优化公司
  • 网站建设与规划实验心得体会/网络搜索引擎有哪些
  • 做淘宝的导购网站/东莞企业网站排名
  • 利用excel做填报网站/有没有可以代理推广的平台
  • 广告网站模板下载 迅雷下载不了/推广之家官网
  • 编程 毕业设计代做网站/30个免费货源网站
  • 东营 网站建设/石家庄网站建设公司
  • 广东省建设厅证书查询官网/seo和sem的概念
  • 网站模板如何修改/杭州上城区抖音seo有多好
  • 义乌公司网站制作/网络营销到底是个啥