随笔分类 - iOS
摘要:一般情况下,就设置UIScrollView所在的控制器 为 UIScrollView的delegate 设置控制器为UIScrollView的delegate有2种方法: 通过代码(self就是控制器) self.scrollView.delegate = self; 通过storyboard拖线(
阅读全文
摘要:很多时候,我们想在UIScrollView正在滚动 或 滚动到某个位置 或者 停止滚动 时做一些特定的操作 要想完成上述功能,前提条件就是能够监听到UIScrollView的整个滚动过程 当UIScrollView发生一系列的滚动操作时, 会自动通知它的代理(delegate)对象,给它的代理发送相
阅读全文
摘要:#pragma mark - 按钮的点击 - (IBAction)top { /* [UIView animateWithDuration:2.0 animations:^{ // CGPoint offset = self.scrollView.contentOffset; // offset.y = 0; // self.scrol...
阅读全文
摘要:@property(nonatomic) CGPoint contentOffset; 这个属性用来表示UIScrollView滚动的位置(其实就是内容左上角与scrollView左上角的间距值) @property(nonatomic) CGSize contentSize; 这个属性用来表示UI
阅读全文
摘要:// ViewController.m // 展示大图片 #import "ViewController.h" @interface ViewController () @property (weak, nonatomic) IBOutlet UIScrollView *scrollView; @end @implementation ViewController - (void...
阅读全文
摘要:什么是UIScrollView 移动设备的屏幕大小是极其有限的,因此直接展示在用户眼前的内容也相当有限当展示的内容较多,超出一个屏幕时,用户可通过滚动手势来查看屏幕以外的内容普通的UIView不具备滚动功能,不适合显示过多的内容UIScrollView是一个能够滚动的视图控件,可以用来展示大量的内容
阅读全文
摘要:// XMGSubTagViewController.m #import "XMGSubTagViewController.h" #import #import "XMGSubTagItem.h" #import @interface XMGSubTagViewController () @property (nonatomic, strong) NSArray *subTags;...
阅读全文
摘要:// XMGAdViewController.m #import "XMGAdViewController.h" #import #import "XMGADItem.h" #import #import #import "XMGTabBarController.h" @interface XMGAdViewController () @property (weak, nona...
阅读全文
摘要:// XMGAdViewController.m #import "XMGAdViewController.h" #import #import "XMGADItem.h" #import #import @interface XMGAdViewController () @property (weak, nonatomic) IBOutlet UIImageView *laun...
阅读全文
摘要:// XMGAdViewController.m #import "XMGAdViewController.h" #import /* 1.广告业务逻辑 2.占位视图思想:有个控件不确定尺寸,但是层次结构已经确定,就可以使用占位视图思想 3.屏幕适配.通过屏幕高度判断 */ #define code2 @"phcqnauGuHYkFMRquANhmgN_Ia...
阅读全文
摘要:CocoaPods是什么? 当你开发iOS应用时,会经常使用到很多第三方开源类库,比如JSONKit,AFNetWorking等等。可能某个类库又用到其他类库,所以要使用它,必须得另外下载其他类库,而其他类库又用到其他类库,“子子孙孙无穷尽也”,这也许是比较特殊的情况。总之小编的意思就是,手动一个个
阅读全文
摘要:AppDelegate.m XMGAdViewController.m
阅读全文
摘要:#import "XMGNavigationViewController.h" @interface XMGNavigationViewController () @end @implementation XMGNavigationViewController - (void)viewDidLoad { [super viewDidLoad]; UIPanGesture...
阅读全文
摘要:#import "XMGNavigationViewController.h" @interface XMGNavigationViewController () @end @implementation XMGNavigationViewController + (void)load { UINavigationBar *navBar = [UINavigationBar ap...
阅读全文
摘要:XMGNavigationViewController.m UIBarButtonItem+Item.m
阅读全文
摘要:- (void)setting { // 跳转到设置界面 XMGSettingViewController *settingVc = [[XMGSettingViewController alloc] init]; // 必须要在跳转之前设置,隐藏底部条 settingVc.hidesBottomBarWhenPushed = YES; [sel...
阅读全文
摘要:#import "XMGNavigationViewController.h" @interface XMGNavigationViewController () @end @implementation XMGNavigationViewController + (void)load { UINavigationBar *navBar = [UINavigationBar app...
阅读全文
摘要:UIBarButtonItem+Item.h UIBarButtonItem+Item.m
阅读全文
摘要:/* pch步骤:1.提前编译Pch 1.存放公用宏 2.存放公用头文件 3.自定义Log */ #import "UIView+Frame.h" #ifdef DEBUG // 调试 #define XMGLog(...) NSLog(__VA_ARGS__) #else // 发布 #defin
阅读全文

浙公网安备 33010602011771号