第12月第2天uiscrollview_adjustcontentoffsetifnecessary

lianhuaren lianhuaren     2022-09-17     229

关键词:

1.

uiscrollview在调用setFrame,setBounds等方法的时候会默认调用稀有api: _adjustContentOffsetIfNecessary

这个方法会改变当前的contentOffset值

 

如果没有设置 

self.automaticallyAdjustsScrollViewInsets = NO;

那么

(CGPoint) contentOffset = (x = 0, y = -20)

 

 

http://04rjgchyq.blog.163.com/blog/static/175937163201293044058562/

 

2.

 

单独禁止下拉

    if (_tableView.contentOffset.y < 0) {

        _tableView.contentOffset = CGPointMake(0, 0);

    }

 

http://www.jianshu.com/p/20697a712879

第2月第24天coretext行高

1.NSMutableAttributedString 行高 NSMutableAttributedString*attributedString=[[NSMutableAttributedStringalloc]initWithString:labelText];NSMutableParagraphStyle*paragraphStyle=[[NSMutableParagra 查看详情

第12月第30天love2d

1.LinuxOnLinux,youcanuseoneofthesecommandlines:love/home/path/to/gamedir/love/home/path/to/packagedgame.loveIfyouinstalledLÖVEsystem-wide,youcandoubleclickon.lovefilesinyourfilemanageraswell.MacO 查看详情

第26月第2天vimjavacomplete

1.将解压出来的autoload和doc的内容添加到~/.vim/下的相应目录下,如果~/.vim下没有这两个文件夹就手动创建其中autoload里的有javacomplete.vimjava_parser.vimReflection.java三个文件,要做的事情是编译:javacReflection.java得到一个.class文件将.clas... 查看详情

第25月第2天django项目01

1.exportPATH="$PATH":/Applications/XAMPP/xamppfiles/bin/ sudoln-s/Applications/XAMPP/xamppfiles/lib/libmysqlclient.18.dylib/usr/lib/libmysqlclient.18.dylib  更新20160318的node  3 查看详情

第26月第3天javagradle

1.430/Applications/AndroidStudio.app/Contents/gradle/gradle-2.8/bin/gradle-v434mkdirgradle01435cdgradle01 437 /Applications/AndroidStudio.app/Contents/gradle/gradle-2.8/bin/gradleinit--typ 查看详情

第42月第5天swiftplaygroundsmac版上线

1.SwiftPlaygroundsMac版上线https://apps.apple.com/cn/app/swift-playgrounds/id1496833156?mt=12&ign-mpt=uo%3D4https://zhuanlan.zhihu.com/p/106538941 查看详情

第9月第12天lua_pushlua_tolual_check

1.c代码中通过lua_push把数据压入堆栈。luaL_check是对lua_to的封装,从堆栈中获取lua代码中函数调用的数据。 staticintlread(lua_State*L){structsocket*s=lua_touserdata(L,1);if(s==NULL||s->listen_fd<0){returnluaL_error(L,"startsocket 查看详情

第25月第4天djangochinaorg项目记录01

#------------------------------1.djangochinaorg项目https://github.com/DjangoChinaOrg/Django-China-APIhttps://github.com/DjangoChinaOrg/Django-China-FE 2.vueproxyTableproxyTable:‘/proxy‘:target:‘h 查看详情

第3月第15天afconvertlame

1.//CAF转换成MP3(可以)afconvert-fmp4f-daac-b128000 /Users/amarishuyi/Desktop/sound1.caf/Users/amarishuyi/Desktop/sound1.mp3 http://blog.csdn.net/ysy441088327/article/details/7388351 2.lame#i 查看详情

第27月第10天cmake(代码片段)

1.error:tool‘xcodebuild‘requiresXcode的解决办法 sudoxcode-select--switch/Applications/Xcode.app/Contents/Developer/   https://blog.csdn.net/shorewb/article/details/52447554  2 查看详情

第21月第6天市场永远是对的

1.cs231nhttps://blog.csdn.net/kangroger/article/list/2http://study.163.com/course/courseMain.htm?courseId=1003223001 2. 我们应该记住,既成的事实一定有它的道理,如果我们不能理解它,恐怕得从自身找原因。如果你交易股票,请记住,如果预测... 查看详情

第9月第3天uilabelcontentscale

1. http://blog.csdn.net/u012703795/article/details/43706449 查看详情

第9月第30天mvp

1. importUIKitstructPerson{//ModelletfirstName:StringletlastName:String}protocolGreetingView:class{funcsetGreeting(greeting:String)}protocolGreetingViewPresenter{init(view:GreetingView,person:Per 查看详情

第16月第27天pipinstallvirtualenv

1.pipinstallvirtualenvvirtualenvtestvircdtestvircdScriptsactivatepipinstalldjango==1.9.8 https://zhuanlan.zhihu.com/p/32286726 查看详情

第10月第28天touchesbegan

1.-(void)touchesBegan:(NSSet*)toucheswithEvent:(UIEvent*)event{[[selfnextResponder]touchesBegan:toucheswithEvent:event];[supertouchesBegan:toucheswithEvent:event];}-(void)touchesMoved:(NSSet*)touchesw 查看详情

第37月第29天avplayer截屏

1.-(void)displayLinkCallback:(CADisplayLink*)sender{CMTimetime=[snapshotOutputitemTimeForHostTime:CACurrentMediaTime()];if([snapshotOutputhasNewPixelBufferForItemTime:time]){lastSnapshotPixelBuffer=[s 查看详情

第5月第18天视频编辑水印

1.//***********ForASpecialTimeCABasicAnimation*animation=[CABasicAnimationanimationWithKeyPath:@"opacity"];[animationsetDuration:0];[animationsetFromValue:[NSNumbernumberWithFloat:1.0]];[animationsetT 查看详情

第16月第3天afurlsessionmanager

1. -(AFURLSessionManagerTaskDelegate*)delegateForTask:(NSURLSessionTask*)task{  NSParameterAssert(task);   AFURLSessionManagerTaskDelegate*delegate=nil;  [self. 查看详情