我很想知道,是否有任何人知道有轻松的办法来抹去“IDWeb”的颜色。 View或UITextView。 我知道有可能在“你”一栏上 all倒一切,但我并不希望用户必须做事,他们应当能够用一个点击来照亮颜色,这样,如果情况不好,阅读一些东西就会更容易,而且对用户周围的人的影响也会更少。
感谢任何帮助!
我很想知道,是否有任何人知道有轻松的办法来抹去“IDWeb”的颜色。 View或UITextView。 我知道有可能在“你”一栏上 all倒一切,但我并不希望用户必须做事,他们应当能够用一个点击来照亮颜色,这样,如果情况不好,阅读一些东西就会更容易,而且对用户周围的人的影响也会更少。
感谢任何帮助!
这里,我通过注射 j语在“IDWebView”(过去)。
第一编
#define invertJS @"function load_script(src,callback){var s=document.createElement( script );s.src=src;s.onload=callback;document.getElementsByTagName( head )[0].appendChild(s);}function invertColors(){var colorProperties=[ color , background-color ];$( * ).each(function(){var color=null;for(var prop in colorProperties){prop=colorProperties[prop];if(!$(this).css(prop))continue;color=new RGBColor($(this).css(prop));if(color.ok){$(this).css(prop, rgb( +(255-color.r)+ , +(255-color.g)+ , +(255-color.b)+ ) );}color=null;}});}load_script( http://www.phpied.com/files/rgbcolor/rgbcolor.js ,function(){if(!window.jQuery)load_script( https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js ,invertColors);else invertColors();})"
And then when your webview finishes loading
- (void)webViewDidFinishLoad:(UIWebView *)webview{
[webview stringByEvaluatingJavaScriptFromString:invertJS];}
关于UITextView,你可以确定文字的肤色和背景的肤色属性,我从那里知道,你可以建立一个子,在白色背/黑体字和黑背/白色案文之间转用。 不幸的是,我看不到《国歌》的任何类似属性。
同样,在将颜色传入这些特性时,你可以使用海克斯的数值,而不是 Apple果的先兆。 这样,你就可以把属性的价值称作天花,用任何几种公式加以改变,并将新的海牛价值回馈给特性。
Inverting a Hex color, put simply:
// maximum hex value is FFFFFF, so
newHex = FFFFFF - oldHex;
为获取任何<代码>Color的《全球统一制度》组成部分,您可使用本答复中所规定的代码:
那么,你可以通过从1.0中减去(但不是a)项的镜头、g和b部分,然后利用这些经过修改的部件生产新的颜色,如:
r = 1.0 - r;
g = 1.0 - g;
b = 1.0 - b;
UIColor newColor = [UIColor colorWithRed:r green:g blue:b alpha:1.0];
I ended up just making two separate files on my server. One that is inverted and one that is regular. There does not seem to be anything in core graphics at least that I could find that would easily do this and to be honest HTML or CSS are definitely not my strong points. Still if anyone has a simpler solution for this I am more than interested in a good idea.
For a basic app with nonconsumable in-app purchases, has anyone figured out best practices for using SKPaymentQueue s restoreCompletedTransactions? Observations I know it s recommended to always ...
I am trying to list the contents of Ringtones directory in a TableView, however, I am only getting the last file in the directory in ALL cells, instead of file per cell. This is my code: - (...
I have a UITextField that is a subview of a UITableViewCell. When my view loads, I want the text field to become first responder. I have a pointer to the text field in the table cell, so to do this I ...
I ve been working on adding in-app purchases and was able to create and test in-app purchases using Store Kit (yay!). During testing, I exercised my app in a way which caused the app to crash mid ...
In my app i have a bunch of data i store in the NSUserdefaults. This information consists of an NSObject (Object1) with NSStrings and NSNumbers and also 2 instances of yet another object (Object2). ...
Basically I m downloading images off of a webserver and then caching them to the disk, but before I do so I want to mask them. I m using the masking code everyone seems to point at which can be found ...
I m using this code to resize an image on the iPhone: CGRect screenRect = CGRectMake(0, 0, 320.0, 480.0); UIGraphicsBeginImageContext(screenRect.size); [value drawInRect:screenRect blendMode:...
Is there a simple way of allowing interaction with a button in a UIView that lies under another UIView - where there are no actual objects from the top UIView on top of the button? For instance, ...