首页
Python
Java
IOS
Andorid
NodeJS
JavaScript
HTML5
【
新浪微博客户端(17)-集成MJExtension
】的更多相关文章
新浪微博客户端(17)-集成MJExtension
使用MJExtension框架将字典转换为模型 DJHomeViewController.m /** 载入新的微博数据 */ - (void)loadNewStatues { AFHTTPSessionManager *requestManager = [AFHTTPSessionManager manager]; // 获取当前登录用户及其所关注(授权)用户的最新微博 NSString *urlString = @"https://api.weibo.com/2/statuses/friend…
新浪微博客户端(20)-集成MJRefresh
HomeViewController.m /** 集成下拉刷新控件 */ - (void)setupPullToRefreshView { __unsafe_unretained UITableView *tableView = self.tableView; // 下拉刷新 tableView.mj_header= [MJRefreshNormalHeader headerWithRefreshingBlock:^{ [self pullToRefresh:tableView.mj_heade…
新浪微博客户端(18)-集成下拉刷新控件UIRefreshControl
HomeViewController.m - (void)setupPullToRefreshView { UIRefreshControl *refreshControl = [[UIRefreshControl alloc] init]; [refreshControl addTarget:self action:@selector(refreshNewData:) forControlEvents:UIControlEventValueChanged]; [self.tableView a…
android开发新浪微博客户端 完整攻略 [新手必读]
开始接触学习android已经有3个礼拜了,一直都是对着android的sdk文档写Tutorials从Hello World到Notepad Tutorial算是初步入门了吧,刚好最近对微博感兴趣就打算开发个android版本的新浪微博客户端作为练手项目,并且以随笔的方式详细的记录开发的全过程.本人对java语言以及eclipse Ide都是初次应用基本上属于边学边用,做移动设备上的东西也是第一次,总的来说属于无基础.无经验.无天赋的纯三无人员,还请广大同学们多多给予指点. 开发第一件事情…
Aisen仿新浪微博客户端项目源码
新浪目前已经限制了第三方微博的很多API接口,加上平常时间不够,所以后续可能不会面向产品的去维护Aisen,不过也有了一些新的方向,例如引入最新Android-support-library,在一个完整的APP项目中示例最新的玩意儿,如果你也想以Aisen作为示例项目切入自己的Library库或者UI控件实现某部分的功能,可以联系我. 基本功能 遵循Material Design 发布多图.离线下载.私信(触屏版) 颜色主题切换 手势返回,4.4.5.0状态栏变色 离线编辑,定时发布 多图.…
Android应用--新浪微博客户端新特性滚动视图和启动界面实现
新浪微博客户端新特性滚动视图和启动界面实现 2013年8月20日新浪微博客户端开发之启动界面实现 前言: 使用过新浪微博客户端的童鞋都清楚,客户端每一次升级之后第一次启动界面就会有新特性的介绍,用户通过左右滑动视图可以查看新的特性,查看完最后一个特性之后就进入了主界面了.如果再一次启动程序的时候,就不会再显示新特性介绍的视图了,就会有一个启动界面,延迟一小会然后直接进入主界面.现在很多的应用也是这样,一开始都会介绍这款新应用的一些特性的,这样感觉用户体验也比较良好.我想网上也有很多大神发表过相应…
android 新浪微博客户端的表情功能的实现
这是一篇好文章,我转来收藏,技术的最高境界是分享. 最近在搞android 新浪微博客户端,有一些心得分享弄android客户端表情功能可以用以下思路1.首页把新浪的表情下载到本地一文件夹种,表情图片的命名要用新浪微博表情原来的命名比如 新浪的害羞表情是shame.gif 那么你在本地也得命名为shame.gif,命名相同主要是为了能够匹配表情对应的code.2.把本地的表情都放进android的资源文件里----drawable下面3.访问新浪的表情接口(新浪返回的数据类型有json和xml两…
新浪微博客户端开发之OAuth认证篇
新浪微博客户端开发之OAuth认证篇 2013年7月29日新浪微博客户端开发 OAuth2.0授权机制我在这里就不浪费口舌了,有很多大牛都发表过相关的文章解释OAuth2.0认证的流程,我就随便找了一张图片把这部分内容略过. 在新浪微博API中呢,如何去实现这个认证流程是下面要说的: 实现步骤: 1. 下载新浪微博Android SDK,去新浪开发平台那里找去. 2. 创建项目,这里是OauthTest 2. 解压SDK压缩包,知道jar把它导入到项目当中 项目文档结构如下: 运行项目效果: …
四次元新浪微博客户端Android源码
四次元新浪微博客户端Android源码 源码下载:http://code.662p.com/list/11_1.html [/td][td] [/td][td] [/td][td] 详细说明:http://android.662p.com/thread-6399-1-1.html…
Android新浪微博客户端(七)——ListView中的图片异步加载、缓存
原文出自:方杰|http://fangjie.info/?p=193转载请注明出处 最终效果演示:http://fangjie.sinaapp.com/?page_id=54 该项目代码已经放到github:https://github.com/JayFang1993/SinaWeibo 一.ListView的图片异步加载 我们都知道对每一个Weibo Item都有用户头像,而且每一条微博还可能带有图片.如果在加载列表的同时加载图片,这样有几个缺点,第一很费事,界面卡住,用户体验很不好,第二An…
[Python爬虫] Selenium爬取新浪微博客户端用户信息、热点话题及评论 (上)
转载自:http://blog.csdn.net/eastmount/article/details/51231852 一. 文章介绍 源码下载地址:http://download.csdn.net/detail/eastmount/9501273前一篇文章"[python爬虫] Selenium爬取新浪微博内容及用户信息"简单讲述了如何爬取新浪微博手机端用户信息和微博信息.用户信息:包括用户ID.用户名.微博数.粉丝数.关注数等.微博信息:包括转发或原创.点赞数.转发数.评论数.发布…
《连载 | 物联网框架ServerSuperIO教程》- 17.集成Golden实时数据库,高并发保存测点数据。附:3.4 发布与版本更新说明。
1.C#跨平台物联网通讯框架ServerSuperIO(SSIO)介绍 <连载 | 物联网框架ServerSuperIO教程>1.4种通讯模式机制. <连载 | 物联网框架ServerSuperIO教程>2.服务实例的配置参数说明 <连载 | 物联网框架ServerSuperIO教程>- 3.设备驱动介绍 <连载 | 物联网框架ServerSuperIO教程>-4.如开发一套设备驱动,同时支持串口和网络通讯. <连载 | 物联网框架ServerSupe…
新浪微博客户端(24)-计算原创微博配图frame
DJStatus.h #import <Foundation/Foundation.h> @class DJUser; /** 微博 */ @interface DJStatus : NSObject /** 微博id */ @property (nonatomic,copy) NSString *idstr; /** 微博内容 */ @property (nonatomic,copy) NSString *text; /** 微博关联用户 */ @property (nonatomic,st…
error userinfo error pos 5 友盟分享 网页分享(无新浪微博客户端)
集成友盟分享的时候,其中微博分享,如果没有添加测试账号,就会出现{error userinfo error pos 5}的错误添加测试账号才能分享在测试信息下添加测试账号…
新浪微博客户端(63)-使用block进行链式编程
Person.h #import <Foundation/Foundation.h> @interface Person : NSObject - (Person *(^)())study; - (Person *(^)())run; @end Person.m #import "Person.h" @implementation Person - (Person *(^)())study { return ^{ NSLog(@"study"); ret…
新浪微博客户端(59)-hitTest withEvent方法的使用说明
iOS中的触摸事件总是由最顶层的View首先得到的,当这个View得到该触摸事件的时候可以选择通过 - (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event { return YES; } 方法来决定是否由当前控件来消费掉触摸事件,YES代表由当前控件消费,事件则不再向下传递;No代表事件继续向下传递.与android里面的onTouchEvent返回布尔值类似. 当我们决定由当前控件来消费掉此事件时,还可以进一步决定由当前控件的…
新浪微博客户端(50)-解决输入Emotion表情逐渐变小的问题
UITextView+Extension.h #import <UIKit/UIKit.h> @interface UITextView (Extension) /** 插入属性文本 */ - (NSMutableAttributedString *)insertAttributeText:(NSAttributedString *)insertAttrText; /** 插入属性文本和要设置的block内容 */ - (NSMutableAttributedString *)insertAt…
新浪微博客户端(49)-删除输入的Emotion表情
DJComposePageView.m - (void)deleteInputEmotion { // 发通知 [[NSNotificationCenter defaultCenter] postNotificationName:DJEmotionDidDeletedNotification object:nil]; } DJComposeViewController.m // 注册监听删除表情通知 [[NSNotificationCenter defaultCenter] addObserve…
新浪微博客户端(47)-在TextView中插入表情
DJEmotionPageView.m // 发送点击广播(和android类似,区别在于android的广播是只要有上下文对象context,就可以发送) // iOS中的通知发送和接收都是通过NSNotificationCenter完成 NSMutableDictionary *userInfo = [NSMutableDictionary dictionary]; userInfo[DJEmotionDidSelctedEmotionKey] = btn.emotion; [[NSNoti…
新浪微博客户端(40)-使用AFN发送带图片的微博
DJComposeViewController.m /** 发微博 */ - (void)sendStatusRequest { AFHTTPSessionManager *RequestManager = [AFHTTPSessionManager manager]; NSArray *photos = self.photosView.photos; if (photos.count) { // 当前用户选择了图片 UIImage *photoImage = [photos firstObje…
新浪微博客户端(36)-自定义带placeholder的TextView
iOS 上自带的UITextView竟然不能设置placeholder,但是UITextView却可以,我也真是醉了.没办法了,自己写一个 DJTextView.h #import <UIKit/UIKit.h> @interface DJTextView : UITextView @property (nonatomic,copy) NSString *placeholder; @property (nonatomic,strong) UIColor *placeholderColor; @…
新浪微博客户端(35)-使用NSMutableAttributedString实现多行文本的效果
DJComposeViewController.m import "DJComposeViewController.h" #import "DJAccountTool.h" @implementation DJComposeViewController - (void)viewDidLoad { [super viewDidLoad]; [self initNavigationView]; [self initInputView]; } - (void)viewDi…
新浪微博客户端(34)-block的细节与本质
main.m #import <Foundation/Foundation.h> void test4(); int main(int argc, const char * argv[]) { @autoreleasepool { test4(); } ; } // 普通的局部变量,block只会引用它初始的值(block定义那一刻),不能跟踪变量的改变 void test1() { ; void (^next)() = ^{ printf("当前i的值是:%d\n",i)…
新浪微博客户端(32)-设置相册图片的contentMode
DJStatusPhotoView.m #import "DJStatusPhotoView.h" #import "UIImageView+WebCache.h" #import "DJPhoto.h" @interface DJStatusPhotoView() // GIF标记 @property (nonatomic,weak) UIImageView *gifView; @end @implementation DJStatusPhot…
新浪微博客户端(31)-显示相册图片上的GIF标记
DJStatusPhotoView.h #import <UIKit/UIKit.h> @class DJPhoto; @interface DJStatusPhotoView : UIImageView @property (nonatomic,strong) DJPhoto *photo; @end DJStatusPhotoView.m #import "DJStatusPhotoView.h" #import "UIImageView+WebCache.h…
新浪微博客户端(23)-计算Cell内控件的frame
DJStatusCellFrame.m #import "DJStatusCellFrame.h" #import "DJStatus.h" #import "DJUser.h" @implementation DJStatusCellFrame - (void)setStatus:(DJStatus *)status { _status = status; DJUser *user = status.user; /* 计算控件Frame */…
新浪微博客户端(22)-创建微博Cell
DJStatusCell.h #import <UIKit/UIKit.h> @class DJStatusCellFrame; @interface DJStatusCell : UITableViewCell /** DJStatusCell 的默认构造方法 */ + (instancetype)cellWithTableView:(UITableView *)tableView; @property (nonatomic,strong) DJStatusCellFrame *status…
新浪微博客户端(3)-封装UIBarButtonItem
单独给NavigationBar上的两个NavigationItem设置图片显得比较麻烦,下面对创建单个UIBarButtonItem的过程进行封装. UIBarButtonItem+Extension.m #import "UIBarButtonItem+Extension.h" @implementation UIBarButtonItem (Extension) + (UIBarButtonItem *)itemWithTarget:(id)target action:(SEL)…
新浪微博客户端(2)-自定义导航控制器,统一NavigationItem
继承系统提供的UINavigationViewController,拦截并重写其push方法. #import "DJNavigationController.h" @implementation DJNavigationController - (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated { ) { // 自定义左上角按钮 UIButton *backBtn…
新浪微博客户端(1)-实现Tabbar导航栏效果
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // 1. 创建窗口 self.window = [[UIWindow alloc] init]; self.window.frame = [UIScreen mainScreen].bounds; // 2. 设置根控制器 UITabBarController *tabbar…