Use linkObj to prevent the first object from being nil. Using linkEnd to get the call result, which is standard practice, if the chain goes wrong it converts it to nil instead of an ErrorObject.【使用linkObj防止第一个对象是nil的情况。使用linkEnd获取调用结果,这是标准的做法,如果链条出错它会将其转化为nil而不是一个ErrorObject】
//Take the operation of a splicing string.//我们以进行一次拼接字符串的操作为例//1.crash happend//1.崩溃发生NSString* priceStr = aStringIsNil.strAppend(@"¥");
//2.return a LinkError object//2.返回一个LinkError错误对象NSString* priceStr = linkObj(aUIViewObject).strAppend(@"¥");
//3.Standard practice,we get nil and the console will report the errors.//3.这是标准的做法;这里返回nil并且控制台打印出现的问题;NSString* priceStr = linkObj(aStringIsNil).strAppend(@"¥").linkEnd;
//1【写法一】linkObjs(viewA, viewB).viewAddToView(self.view);
//同时移除数组和视图的子项linkObjs(view.subviews, self.imageViewArray).objRemoveAll();
//2【写法二】
linkResults = @[arrA,arrB,arrC].makeLinkObjs.m_arrAddObj(@"E").linkEnds;
//3【写法三】
linkResults = arrA.linkAnd(arrB).linkAnd(arrC).m_arrAddObj(@"D").linkEnds;
//4.Repeat the following code 100 times【写法四,简单粗暴的重复执行之后链条100次,这种情况不需要for循环了】
linkResults = arrA.linkLoop(100).m_arrAddObj(@"F").linkEnds;
//Multiple controls one to display the other hidden【多个控件一个显示其他隐藏】linkObjs(viewA,viewB,...).viewHiddenYES().linkAt(selectedIndex).viewHiddenNO();
The Tidelift Subscription provides access to a continuously curated stream of human-researched and maintainer-verified data on open source packages and their licenses, releases, vulnerabilities, and development practices.